< prev index next >

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

Print this page
rev 58060 : [mq]: 8238999-iklam-review

@@ -259,20 +259,16 @@
   _chunk_list = NULL;
   _free_list = NULL;
 }
 
 G1CMRootMemRegions::G1CMRootMemRegions(uint const max_regions) :
-    _root_regions(NEW_C_HEAP_ARRAY(MemRegion, max_regions, mtGC)),
+    _root_regions(MemRegion::create(max_regions, mtGC)),
     _max_regions(max_regions),
     _num_root_regions(0),
     _claimed_root_regions(0),
     _scan_in_progress(false),
-    _should_abort(false) {
-  for (uint i = 0; i < max_regions; i++) {
-    ::new (&_root_regions[i]) MemRegion();
-  }
-}
+    _should_abort(false) { }
 
 G1CMRootMemRegions::~G1CMRootMemRegions() {
   FREE_C_HEAP_ARRAY(MemRegion, _root_regions);
 }
 
< prev index next >