Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6419661

Implement a subclass of GrowableArray that does not rely on vm_exit_out_of_memory()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 9
    • 7
    • hotspot
    • gc
    • generic
    • generic

      If the current implementation of GrowableArray cannot grow, it will
      call vm_exit_out_of_memory(). Implement a subclass of GrowableArray
      that returns a fail if the GrowableArray cannot grow so that
      the caller can handle the failure.
      The class GrowableArray is used to allocate space from the C heap. If
      needed the space can be expanded when the original allocation is full. If
      an attempt to expand the GrowableArray fails, the current implementation
      call vm_exit_out_of_memory() and the VM exits. There are some situations
      where the VM could recover from a failure to expand without exiting. In
      order to more gracefully handle an expansion failure, the caller of
      the assignment to a GrowableArray (the push method for GrowableArray) needs
      to be returned a value indicating a failure (as opposed to having push()
      exit). Find an example of the use of GrowableArray which could gracefully
      recover from an expansion failure to verify that this is a useful RFE. See
      the evaluation section for 1 possibility.

            jmasa Jon Masamitsu (Inactive)
            jmasa Jon Masamitsu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: