--- a/src/hotspot/share/oops/typeArrayKlass.cpp Thu Jun 28 15:17:44 2018 +0200
+++ b/src/hotspot/share/oops/typeArrayKlass.cpp Thu Jun 28 14:22:28 2018 +0200
@@ -102,14 +102,8 @@
if (length >= 0) {
if (length <= max_length()) {
size_t size = typeArrayOopDesc::object_size(layout_helper(), length);
- typeArrayOop t;
- CollectedHeap* ch = Universe::heap();
- if (do_zero) {
- t = (typeArrayOop)CollectedHeap::array_allocate(this, (int)size, length, CHECK_NULL);
- } else {
- t = (typeArrayOop)CollectedHeap::array_allocate_nozero(this, (int)size, length, CHECK_NULL);
- }
- return t;
+ return (typeArrayOop)Universe::heap()->array_allocate(this, (int)size, length,
+ do_zero, CHECK_NULL);
} else {
report_java_out_of_memory("Requested array size exceeds VM limit");
JvmtiExport::post_array_size_exhausted();