RFR: 8058298: Separate heap region iterator claim values from the data structures iterated over
thomas.schatzl at oracle.com
Mon Oct 6 11:26:51 UTC 2014
On Mon, 2014-10-06 at 13:08 +0200, Bengt Rutisson wrote:
> Hi Marcus,
> Nice work!
> It looks really good to me.
> Some minor comments:
> Can we introduce a getter in G1CollectedHeap for this instead of adding
> two friend declarations?
I somewhat prefer the friend declaration:
_hrm._allocated_heapregions_length is somewhat of a hack and is
preferably not available from outside, because potentially people start
using it for iteration over the heap again then ;)
What could be done to hide this is to create a factory method for the
HeapRegionClaimer in HeapRegionManager, or pass the HeapRegionClaimer
instance to a HeapRegionManager instance for initialization.
More information about the hotspot-gc-dev