< 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
@@ -232,10 +232,26 @@
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;
+ 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;
+}
+
void FreeRegionList::verify() {
// See comment in HeapRegionSetBase::verify() about MT safety and
// verification.
check_mt_safety();
< prev index next >