< prev index next >
src/hotspot/share/gc/g1/heapRegionSet.cpp
Print this page
rev 51649 : version 1
rev 51878 : Minor changes
rev 52017 : All changes for G1 GC moved from 'combined' repo folder
rev 52487 : Worked on comments from Sangheon, Stefan
*** 232,241 ****
--- 232,256 ----
name(), length(), old_length, num_regions);
verify_optional();
}
+ 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;
+ }
+
void FreeRegionList::verify() {
// See comment in HeapRegionSetBase::verify() about MT safety and
// verification.
check_mt_safety();
< prev index next >