equal
deleted
inserted
replaced
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 |