src/hotspot/share/gc/g1/heapRegionSet.cpp
changeset 53116 bb03098c4dde
parent 51496 bf6b66fa8bdf
child 59062 6530de931b8e
equal deleted inserted replaced
53115:b5c41404f2d1 53116:bb03098c4dde
   232          name(), length(), old_length, num_regions);
   232          name(), length(), old_length, num_regions);
   233 
   233 
   234   verify_optional();
   234   verify_optional();
   235 }
   235 }
   236 
   236 
       
   237 uint FreeRegionList::num_of_regions_in_range(uint start, uint end) const {
       
   238   HeapRegion* cur = _head;
       
   239   uint num = 0;
       
   240   while (cur != NULL) {
       
   241     uint index = cur->hrm_index();
       
   242     if (index > end) {
       
   243       break;
       
   244     } else if (index >= start) {
       
   245       num++;
       
   246     }
       
   247     cur = cur->next();
       
   248   }
       
   249   return num;
       
   250 }
       
   251 
   237 void FreeRegionList::verify() {
   252 void FreeRegionList::verify() {
   238   // See comment in HeapRegionSetBase::verify() about MT safety and
   253   // See comment in HeapRegionSetBase::verify() about MT safety and
   239   // verification.
   254   // verification.
   240   check_mt_safety();
   255   check_mt_safety();
   241 
   256