Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/heapRegionSeq.inline.hpp @ 20336:6701abbc4441
8054818: Refactor HeapRegionSeq to manage heap region and auxiliary data
Summary: Let HeapRegionSeq manage the heap region and auxiliary data to decrease the amount of responsibilities of G1CollectedHeap, and encapsulate this work from other code.
Reviewed-by: jwilhelm, jmasa, mgerdin, brutisso
author | tschatzl |
---|---|
date | Tue, 19 Aug 2014 10:50:27 +0200 |
parents | eec72fa4b108 |
children | 1f1d373cd044 |
comparison
equal
deleted
inserted
replaced
20335:eec72fa4b108 | 20336:6701abbc4441 |
---|---|
38 assert(hr != NULL, "invariant"); | 38 assert(hr != NULL, "invariant"); |
39 return hr; | 39 return hr; |
40 } | 40 } |
41 | 41 |
42 inline HeapRegion* HeapRegionSeq::at(uint index) const { | 42 inline HeapRegion* HeapRegionSeq::at(uint index) const { |
43 assert(index < length(), "pre-condition"); | 43 assert(is_available(index), "pre-condition"); |
44 HeapRegion* hr = _regions.get_by_index(index); | 44 HeapRegion* hr = _regions.get_by_index(index); |
45 assert(hr != NULL, "sanity"); | 45 assert(hr != NULL, "sanity"); |
46 assert(hr->hrs_index() == index, "sanity"); | 46 assert(hr->hrs_index() == index, "sanity"); |
47 return hr; | 47 return hr; |
48 } | 48 } |
49 | 49 |
50 inline void HeapRegionSeq::insert_into_free_list(HeapRegion* hr) { | |
51 _free_list.add_ordered(hr); | |
52 } | |
53 | |
54 inline void HeapRegionSeq::allocate_free_regions_starting_at(uint first, uint num_regions) { | |
55 _free_list.remove_starting_at(at(first), num_regions); | |
56 } | |
57 | |
50 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSEQ_INLINE_HPP | 58 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSEQ_INLINE_HPP |