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

G1: allocate all HeapRegions in a single block

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • hs22
    • hotspot
    • gc
    • Fix Understood
    • generic
    • generic

      This might be a further improvement to what was done in 7045330 (G1: Simplify/fix the HeapRegionSeq class).

      Abbreviations:

      G1CH : G1CollectedHeap
      HR : HeapRegion
      HRS : HeapRegionSeq

      Before 7045330, we had three levels of indirection from G1CH to a HR instance:

      G1CH -> HRS -> HR*[] -> HR

      By embedding HRS in G1CH we avoided one of those indirections:

      G1CH -> HR*[] -> HR

      We might be able to remove one more by allocating the HeapRegion instances in a single HeapRegion[] array instead of the HeapRegion*[] array we have now:

      G1CH-> HR[]

      Pros:

      - One less indirection when mapping address -> region which might be beneficial performance-wise on some platforms.
      - Simplified management of the HeapRegion instances (we'll allocate them once and that's it).

      Cons:

      - We have to pre-allocate the max number of HeapRegions up-front, even if we never grow the heap to the maximum size, which will have some footprint impact.

            Unassigned Unassigned
            tonyp Tony Printezis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: