mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8205683: Refactor heap allocation to separate concerns
Reviewed-by: pliden, kbarrett
This commit is contained in:
parent
7f3a801cae
commit
e4dbe9909f
22 changed files with 638 additions and 528 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue