hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.inline.hpp
changeset 26157 70eddb655686
parent 24424 2658d7834c6e
child 26160 aba6b01cb988
equal deleted inserted replaced
26154:7a33b179d6c5 26157:70eddb655686
    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