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

manageAllocFailure may not cause heap compaction, causes extra compactHeap call

XMLWordPrintable

    • generic
    • generic

      FYI - Licensee noticed that in 1.1.6 the first call to gc from
      manageAllocFailure may not cause the heap to be compacted,
      but that subsequent calls that result because the total free
      space needs to be increased may cause compactHeap to be called.

      As an example, say we want 1000 bytes. The first call to gc from
      manageAllocFailure does a freeSweep, which does free at least one
      object that gives enough space for the 1000 byte allocation. But,
      the total freespace is not large enough, so finalization is done ...
      followed by another gc call (requesting 1000 bytes). If no object
      >= 1000 bytes is freed, compactHeap is called, even though we already
      know the first free sweep free enough space for it.

            hongzh Hong Zhang
            jbenoit Jonathan Benoit (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: