< prev index next >

src/hotspot/share/gc/g1/g1Allocator.cpp

Print this page
rev 49852 : imported patch 8191471-g1-retained-mutator-region

@@ -155,18 +155,11 @@
   }
 }
 
 size_t G1Allocator::used_in_alloc_regions() {
   assert(Heap_lock->owner() != NULL, "Should be owned on this thread's behalf.");
-  size_t result = 0;
-
-  // Read only once in case it is set to NULL concurrently
-  HeapRegion* hr = mutator_alloc_region()->get();
-  if (hr != NULL) {
-    result += hr->used();
-  }
-  return result;
+  return mutator_alloc_region()->used_in_alloc_regions();
 }
 
 
 HeapWord* G1Allocator::par_allocate_during_gc(InCSetState dest,
                                               size_t word_size) {
< prev index next >