--- old/src/hotspot/share/gc/g1/heapRegionManager.hpp 2018-10-03 10:33:05.399870859 +0200 +++ new/src/hotspot/share/gc/g1/heapRegionManager.hpp 2018-10-03 10:33:04.986858332 +0200 @@ -123,10 +123,10 @@ public: bool is_free(HeapRegion* hr) const; #endif +public: // Returns whether the given region is available for allocation. bool is_available(uint region) const; - public: // Empty constructor, we'll initialize it with the initialize() method. HeapRegionManager(); @@ -147,6 +147,10 @@ // is valid. inline HeapRegion* at(uint index) const; + // Return the HeapRegion at the given index, NULL if the index + // is for an unavailable region. + inline HeapRegion* at_or_null(uint index) const; + // Return the next region (by index) that is part of the same // humongous object that hr is part of. inline HeapRegion* next_region_in_humongous(HeapRegion* hr) const;