mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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
|
@ -1184,8 +1184,8 @@ objArrayOop InstanceKlass::allocate_objArray(int n, int length, TRAPS) {
|
|||
}
|
||||
int size = objArrayOopDesc::object_size(length);
|
||||
Klass* ak = array_klass(n, CHECK_NULL);
|
||||
objArrayOop o =
|
||||
(objArrayOop)CollectedHeap::array_allocate(ak, size, length, CHECK_NULL);
|
||||
objArrayOop o = (objArrayOop)Universe::heap()->array_allocate(ak, size, length,
|
||||
/* do_zero */ true, CHECK_NULL);
|
||||
return o;
|
||||
}
|
||||
|
||||
|
@ -1210,7 +1210,7 @@ instanceOop InstanceKlass::allocate_instance(TRAPS) {
|
|||
|
||||
instanceOop i;
|
||||
|
||||
i = (instanceOop)CollectedHeap::obj_allocate(this, size, CHECK_NULL);
|
||||
i = (instanceOop)Universe::heap()->obj_allocate(this, size, CHECK_NULL);
|
||||
if (has_finalizer_flag && !RegisterFinalizersAtInit) {
|
||||
i = register_finalizer(i, CHECK_NULL);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue