< 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


 217 
 218     curr->set_next(NULL);
 219     curr->set_prev(NULL);
 220     remove(curr);
 221 
 222     count++;
 223     curr = next;
 224   }
 225 
 226   assert(count == num_regions,
 227          "[%s] count: %u should be == num_regions: %u",
 228          name(), count, num_regions);
 229   assert(length() + num_regions == old_length,
 230          "[%s] new length should be consistent "
 231          "new length: %u old length: %u num_regions: %u",
 232          name(), length(), old_length, num_regions);
 233 
 234   verify_optional();
 235 }
 236 
















 237 void FreeRegionList::verify() {
 238   // See comment in HeapRegionSetBase::verify() about MT safety and
 239   // verification.
 240   check_mt_safety();
 241 
 242   // This will also do the basic verification too.
 243   verify_start();
 244 
 245   verify_list();
 246 
 247   verify_end();
 248 }
 249 
 250 void FreeRegionList::clear() {
 251   _length = 0;
 252   _head = NULL;
 253   _tail = NULL;
 254   _last = NULL;
 255 }
 256 




 217 
 218     curr->set_next(NULL);
 219     curr->set_prev(NULL);
 220     remove(curr);
 221 
 222     count++;
 223     curr = next;
 224   }
 225 
 226   assert(count == num_regions,
 227          "[%s] count: %u should be == num_regions: %u",
 228          name(), count, num_regions);
 229   assert(length() + num_regions == old_length,
 230          "[%s] new length should be consistent "
 231          "new length: %u old length: %u num_regions: %u",
 232          name(), length(), old_length, num_regions);
 233 
 234   verify_optional();
 235 }
 236 
 237 uint FreeRegionList::num_of_regions_in_range(uint start, uint end) const {
 238   HeapRegion* cur = _head;
 239   uint num = 0;
 240   bool started = false;
 241   while (cur != NULL && cur->hrm_index() <= end) {
 242     if (!started && cur->hrm_index() >= start) {
 243       started = true;
 244     }
 245     if(started) {
 246       num++;
 247     }
 248     cur = cur->next();
 249   }
 250   return num;
 251 }
 252 
 253 void FreeRegionList::verify() {
 254   // See comment in HeapRegionSetBase::verify() about MT safety and
 255   // verification.
 256   check_mt_safety();
 257 
 258   // This will also do the basic verification too.
 259   verify_start();
 260 
 261   verify_list();
 262 
 263   verify_end();
 264 }
 265 
 266 void FreeRegionList::clear() {
 267   _length = 0;
 268   _head = NULL;
 269   _tail = NULL;
 270   _last = NULL;
 271 }
 272 


< prev index next >