< prev index next >

src/hotspot/share/gc/g1/heapRegionSet.cpp

Print this page
rev 52611 : webrev.00
rev 52613 : webrev.01

*** 235,250 **** } uint FreeRegionList::num_of_regions_in_range(uint start, uint end) const { HeapRegion* cur = _head; uint num = 0; ! bool started = false; ! while (cur != NULL && cur->hrm_index() <= end) { ! if (!started && cur->hrm_index() >= start) { ! started = true; ! } ! if(started) { num++; } cur = cur->next(); } return num; --- 235,249 ---- } uint FreeRegionList::num_of_regions_in_range(uint start, uint end) const { HeapRegion* cur = _head; uint num = 0; ! while (cur != NULL) { ! uint index = cur->hrm_index(); ! if (index > end) { ! break; ! } else if (index >= start) { num++; } cur = cur->next(); } return num;
< prev index next >