diff src/share/vm/gc_implementation/g1/heapRegionManager.cpp @ 20417:d35872270666

8057658: Enable G1 FullGC extensions Summary: Refactored the G1 FullGC code to enable it to be extended. Reviewed-by: mgerdin, brutisso
author sjohanss
date Tue, 09 Sep 2014 00:05:25 +0200
parents b1266b08b994
children 7848fc12602b
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegionManager.cpp	Mon Sep 08 14:13:01 2014 +0000
+++ b/src/share/vm/gc_implementation/g1/heapRegionManager.cpp	Tue Sep 09 00:05:25 2014 +0200
@@ -66,10 +66,11 @@
 #endif
 
 HeapRegion* HeapRegionManager::new_heap_region(uint hrm_index) {
-  HeapWord* bottom = G1CollectedHeap::heap()->bottom_addr_for_region(hrm_index);
+  G1CollectedHeap* g1h = G1CollectedHeap::heap();
+  HeapWord* bottom = g1h->bottom_addr_for_region(hrm_index);
   MemRegion mr(bottom, bottom + HeapRegion::GrainWords);
   assert(reserved().contains(mr), "invariant");
-  return new HeapRegion(hrm_index, G1CollectedHeap::heap()->bot_shared(), mr);
+  return g1h->allocator()->new_heap_region(hrm_index, g1h->bot_shared(), mr);
 }
 
 void HeapRegionManager::commit_regions(uint index, size_t num_regions) {