< prev index next >

src/hotspot/share/memory/memRegion.cpp

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

@@ -99,5 +99,13 @@
     return MemRegion();
   }
   ShouldNotReachHere();
   return MemRegion();
 }
+
+MemRegion* MemRegion::create(uint length, MEMFLAGS flags) {
+  MemRegion* result = NEW_C_HEAP_ARRAY(MemRegion, length, flags);
+  for (uint i = 0; i < length; i++) {
+    ::new (&result[i]) MemRegion();
+  }
+  return result;
+}
< prev index next >