< prev index next >

src/share/vm/gc/g1/heapRegionManager.inline.hpp

Print this page

        

@@ -45,10 +45,22 @@
   assert(hr != NULL, "sanity");
   assert(hr->hrm_index() == index, "sanity");
   return hr;
 }
 
+inline HeapRegion* HeapRegionManager::next_region_in_humongous(HeapRegion* hr) const {
+  uint index = hr->hrm_index();
+  assert(is_available(index), "pre-condition");
+  assert(hr->is_humongous(), "next_region_in_humongous should only be called for a humongous region.");
+  index++;
+  if (index < max_length() && is_available(index) && at(index)->is_continues_humongous()) {
+    return at(index);
+  } else {
+    return NULL;
+  }
+}
+
 inline void HeapRegionManager::insert_into_free_list(HeapRegion* hr) {
   _free_list.add_ordered(hr);
 }
 
 inline void HeapRegionManager::allocate_free_regions_starting_at(uint first, uint num_regions) {
< prev index next >