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

G1HeapRegionManager::find_contiguous_allow_expand ignores free regions when checking regions available for allocation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • 25
    • hotspot
    • gc

      The early return in G1HeapRegionManager::find_contiguous_allow_expand that checks whether we have enough regions to satisfy an allocation does not consider free regions:

        // Check if we can actually satisfy the allocation.
        if (num_regions > available()) {
          return G1_NO_HRM_INDEX;
        }
      Therefore, a `expand_and_allocate_humongous` call may fail, even though a subsequent `expand_and_allocate` call succeeds. This can lead to unexpected allocation behavior.

            iwalulya Ivan Walulya
            iwalulya Ivan Walulya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: