1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Mon Jul 21 09:59:54 2014 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp Mon Jul 21 10:00:31 2014 +0200 1.3 @@ -1167,19 +1167,19 @@ 1.4 } 1.5 1.6 // The total number of regions in the heap. 1.7 - uint n_regions() { return _hrs.length(); } 1.8 + uint n_regions() const { return _hrs.length(); } 1.9 1.10 // The max number of regions in the heap. 1.11 - uint max_regions() { return _hrs.max_length(); } 1.12 + uint max_regions() const { return _hrs.max_length(); } 1.13 1.14 // The number of regions that are completely free. 1.15 - uint free_regions() { return _free_list.length(); } 1.16 + uint free_regions() const { return _free_list.length(); } 1.17 1.18 // The number of regions that are not completely free. 1.19 - uint used_regions() { return n_regions() - free_regions(); } 1.20 + uint used_regions() const { return n_regions() - free_regions(); } 1.21 1.22 // The number of regions available for "regular" expansion. 1.23 - uint expansion_regions() { return _expansion_regions; } 1.24 + uint expansion_regions() const { return _expansion_regions; } 1.25 1.26 // Factory method for HeapRegion instances. It will return NULL if 1.27 // the allocation fails. 1.28 @@ -1377,8 +1377,7 @@ 1.29 // As above but starting from region r 1.30 void collection_set_iterate_from(HeapRegion* r, HeapRegionClosure *blk); 1.31 1.32 - // Returns the first (lowest address) compactible space in the heap. 1.33 - virtual CompactibleSpace* first_compactible_space(); 1.34 + HeapRegion* next_compaction_region(const HeapRegion* from) const; 1.35 1.36 // A CollectedHeap will contain some number of spaces. This finds the 1.37 // space containing a given address, or else returns NULL.