--- old/src/hotspot/share/gc/g1/heapRegionSet.hpp 2019-11-26 16:18:16.598873827 +0100 +++ new/src/hotspot/share/gc/g1/heapRegionSet.hpp 2019-11-26 16:18:16.206871883 +0100 @@ -180,6 +180,10 @@ inline void increase_length(uint node_index); inline void decrease_length(uint node_index); + // Common checks for adding a list. + void add_list_common_start(FreeRegionList* from_list); + void add_list_common_end(FreeRegionList* from_list); + protected: // See the comment for HeapRegionSetBase::clear() virtual void clear(); @@ -202,6 +206,8 @@ // Assumes that the list is ordered and will preserve that order. The order // is determined by hrm_index. inline void add_ordered(HeapRegion* hr); + // Same restrictions as above, but adds the region last in the list. + inline void add_to_tail(HeapRegion* region_to_add); // Removes from head or tail based on the given argument. HeapRegion* remove_region(bool from_head); @@ -212,10 +218,15 @@ // Merge two ordered lists. The result is also ordered. The order is // determined by hrm_index. void add_ordered(FreeRegionList* from_list); + void append_ordered(FreeRegionList* from_list); // It empties the list by removing all regions from it. void remove_all(); + // Abandon current free list. Requires that all regions in the current list + // are taken care of separately, to allow a rebuild. + void abandon(); + // Remove all (contiguous) regions from first to first + num_regions -1 from // this list. // Num_regions must be > 1.