mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
7020992: jmm_DumpThreads should not allocate system object arrays outside the perm gen
Allocate ordinary object arrays Reviewed-by: ysr, never, mchung
This commit is contained in:
parent
57d8e5b8ba
commit
46bcea93ef
3 changed files with 5 additions and 15 deletions
|
@ -92,21 +92,12 @@ objArrayOop oopFactory::new_objArray(klassOop klass, int length, TRAPS) {
|
|||
}
|
||||
}
|
||||
|
||||
objArrayOop oopFactory::new_system_objArray(int length, bool in_perm_gen, TRAPS) {
|
||||
objArrayOop oopFactory::new_system_objArray(int length, TRAPS) {
|
||||
int size = objArrayOopDesc::object_size(length);
|
||||
KlassHandle klass (THREAD, Universe::systemObjArrayKlassObj());
|
||||
oop o;
|
||||
if (in_perm_gen) {
|
||||
o = Universe::heap()->permanent_array_allocate(klass, size, length, CHECK_NULL);
|
||||
} else {
|
||||
o = Universe::heap()->array_allocate(klass, size, length, CHECK_NULL);
|
||||
}
|
||||
objArrayOop o = (objArrayOop)
|
||||
Universe::heap()->permanent_array_allocate(klass, size, length, CHECK_NULL);
|
||||
// initialization not needed, allocated cleared
|
||||
return (objArrayOop) o;
|
||||
}
|
||||
|
||||
objArrayOop oopFactory::new_system_objArray(int length, TRAPS) {
|
||||
objArrayOop o = oopFactory::new_system_objArray(length, true, CHECK_NULL);
|
||||
return o;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue