8205683: Refactor heap allocation to separate concerns

Reviewed-by: pliden, kbarrett
This commit is contained in:
Erik Österlund 2018-06-28 14:22:28 +02:00
parent 7f3a801cae
commit e4dbe9909f
22 changed files with 638 additions and 528 deletions

View file

@ -173,7 +173,8 @@ objArrayOop ObjArrayKlass::allocate(int length, TRAPS) {
if (length >= 0) {
if (length <= arrayOopDesc::max_array_length(T_OBJECT)) {
int size = objArrayOopDesc::object_size(length);
return (objArrayOop)CollectedHeap::array_allocate(this, size, length, THREAD);
return (objArrayOop)Universe::heap()->array_allocate(this, size, length,
/* do_zero */ true, THREAD);
} else {
report_java_out_of_memory("Requested array size exceeds VM limit");
JvmtiExport::post_array_size_exhausted();