JDK-7053537 : G1: allocate all HeapRegions in a single block
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs22
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2011-06-10
  • Updated: 2019-02-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
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.

Comments
EVALUATION The fix for this is straightforward. We just need to decide whether the performance vs. footprint trade-off is the right one.
10-06-2011