src/share/vm/gc_implementation/g1/heapRegionSeq.cpp

Print this page

        

*** 215,226 **** return NULL; } void HeapRegionSeq::iterate(HeapRegionClosure* blk) const { uint len = max_length(); ! for (uint i = 0; i < len; i++) { if (!is_available(i)) { continue; } guarantee(at(i) != NULL, err_msg("Tried to access region %u that has a NULL HeapRegion*", i)); bool res = blk->doHeapRegion(at(i)); --- 215,230 ---- return NULL; } void HeapRegionSeq::iterate(HeapRegionClosure* blk) const { uint len = max_length(); + iterate_range(blk, 0, len); + } ! void HeapRegionSeq::iterate_range(HeapRegionClosure* blk, uint start, uint end) const { ! assert(start <= end && end <= max_length(), "Invalid range."); ! for (uint i = start; i < end; i++) { if (!is_available(i)) { continue; } guarantee(at(i) != NULL, err_msg("Tried to access region %u that has a NULL HeapRegion*", i)); bool res = blk->doHeapRegion(at(i));