diff src/share/vm/services/management.cpp @ 2267:02f78cfa4656

7020992: jmm_DumpThreads should not allocate system object arrays outside the perm gen Summary: Allocate ordinary object arrays Reviewed-by: ysr, never, mchung
author stefank
date Mon, 21 Feb 2011 11:26:45 +0100
parents f7702f8c0e25
children 78542e2b5e35
line wrap: on
line diff
--- a/src/share/vm/services/management.cpp	Mon Feb 14 22:21:18 2011 -0500
+++ b/src/share/vm/services/management.cpp	Mon Feb 21 11:26:45 2011 +0100
@@ -1311,7 +1311,7 @@
     if (locked_monitors) {
       // Constructs Object[] and int[] to contain the object monitor and the stack depth
       // where the thread locked it
-      objArrayOop array = oopFactory::new_system_objArray(num_locked_monitors, false, CHECK_NULL);
+      objArrayOop array = oopFactory::new_objArray(SystemDictionary::Object_klass(), num_locked_monitors, CHECK_NULL);
       objArrayHandle mh(THREAD, array);
       monitors_array = mh;
 
@@ -1353,7 +1353,7 @@
       GrowableArray<instanceOop>* locks = (tcl != NULL ? tcl->owned_locks() : NULL);
       int num_locked_synchronizers = (locks != NULL ? locks->length() : 0);
 
-      objArrayOop array = oopFactory::new_system_objArray(num_locked_synchronizers, false, CHECK_NULL);
+      objArrayOop array = oopFactory::new_objArray(SystemDictionary::Object_klass(), num_locked_synchronizers, CHECK_NULL);
       objArrayHandle sh(THREAD, array);
       synchronizers_array = sh;