RFR (XXL): 8038423: G1: Decommit memory within the heap

Thomas Schatzl thomas.schatzl at oracle.com
Tue Aug 12 15:12:07 UTC 2014

Hi all,

  can I have reviews for this change? It implements the capability for
G1 to shrink/expand the heap on a per-region basis without the
constraint that shrinking/expansion needs to occur at the highest
address of the reserved space.

Further it implements automatic commit/uncommit of all (relevant) large
heap data structures (auxiliary data like block offset table, card
table, mark bitmaps, hot card cache) at the same time the corresponding
heap region is (un-)committed.

This change implements basic support for this new behavior: selection of
regions to (un-)commit is not particularly sophisticated.

For easier reviewing, some notes:
- start at the new initialization code in G1CollectedHeap::initialize()
- all memory commit/uncommit activity of auxiliary data is tied to
regions: the new G1RegionToSpaceMapper class manages translation between
regions and whatever granularity the auxiliary data is
- these G1RegionToSpaceMappers are managed by HeapRegionSeq.

This change is based on the review for JDK-8054818. As mentioned there,
there will be some cleanup CRs after this change: at least a CR to
rename HeapRegionSeq to HeapRegionManager, and another one that cleans
up the card table code.

They were split out for easier review, as they are quite large too but
do not contribute to the functionality.



jprt, aurora (nightly, bigapps, lots of test suites) with -XX:+UseG1GC,
crm fuse


More information about the hotspot-gc-dev mailing list