mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
7018257: jmm_DumpThreads allocates into permgen
Don't allocate in permgen Reviewed-by: ysr, sla
This commit is contained in:
parent
2c35cde750
commit
311bd2a9a9
3 changed files with 15 additions and 5 deletions
|
@ -92,12 +92,21 @@ objArrayOop oopFactory::new_objArray(klassOop klass, int length, TRAPS) {
|
|||
}
|
||||
}
|
||||
|
||||
objArrayOop oopFactory::new_system_objArray(int length, TRAPS) {
|
||||
objArrayOop oopFactory::new_system_objArray(int length, bool in_perm_gen, TRAPS) {
|
||||
int size = objArrayOopDesc::object_size(length);
|
||||
KlassHandle klass (THREAD, Universe::systemObjArrayKlassObj());
|
||||
objArrayOop o = (objArrayOop)
|
||||
Universe::heap()->permanent_array_allocate(klass, size, length, CHECK_NULL);
|
||||
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);
|
||||
}
|
||||
// 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