--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp Fri Sep 05 12:36:37 2014 -0700
+++ b/hotspot/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) {