--- a/hotspot/src/share/vm/oops/instanceKlass.cpp Wed Jun 27 15:23:36 2012 +0200
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Thu Jun 28 17:03:16 2012 -0400
@@ -989,7 +989,7 @@
fieldDescriptor fd;
int length = java_fields_count();
// In DebugInfo nonstatic fields are sorted by offset.
- int* fields_sorted = NEW_C_HEAP_ARRAY(int, 2*(length+1));
+ int* fields_sorted = NEW_C_HEAP_ARRAY(int, 2*(length+1), mtClass);
int j = 0;
for (int i = 0; i < length; i += 1) {
fd.initialize(as_klassOop(), i);
@@ -1009,7 +1009,7 @@
cl->do_field(&fd);
}
}
- FREE_C_HEAP_ARRAY(int, fields_sorted);
+ FREE_C_HEAP_ARRAY(int, fields_sorted, mtClass);
}
@@ -1236,7 +1236,7 @@
if (length <= idnum) {
// allocate a new cache that might be used
size_t size = MAX2(idnum+1, (size_t)ik_h->idnum_allocated_count());
- new_jmeths = NEW_C_HEAP_ARRAY(jmethodID, size+1);
+ new_jmeths = NEW_C_HEAP_ARRAY(jmethodID, size+1, mtClass);
memset(new_jmeths, 0, (size+1)*sizeof(jmethodID));
// cache size is stored in element[0], other elements offset by one
new_jmeths[0] = (jmethodID)size;
@@ -1397,7 +1397,7 @@
// cache size is stored in element[0], other elements offset by one
if (indices == NULL || (length = (size_t)indices[0]) <= idnum) {
size_t size = MAX2(idnum+1, (size_t)idnum_allocated_count());
- int* new_indices = NEW_C_HEAP_ARRAY(int, size+1);
+ int* new_indices = NEW_C_HEAP_ARRAY(int, size+1, mtClass);
new_indices[0] = (int)size;
// copy any existing entries
size_t i;
@@ -1933,7 +1933,7 @@
// deallocate the cached class file
if (_cached_class_file_bytes != NULL) {
- os::free(_cached_class_file_bytes);
+ os::free(_cached_class_file_bytes, mtClass);
_cached_class_file_bytes = NULL;
_cached_class_file_len = 0;
}
@@ -2530,7 +2530,7 @@
// This is the first previous version so make some space.
// Start with 2 elements under the assumption that the class
// won't be redefined much.
- _previous_versions = new (ResourceObj::C_HEAP)
+ _previous_versions = new (ResourceObj::C_HEAP, mtClass)
GrowableArray<PreviousVersionNode *>(2, true);
}
@@ -2556,7 +2556,7 @@
("add: all methods are obsolete; flushing any EMCP weak refs"));
} else {
int local_count = 0;
- GrowableArray<jweak>* method_refs = new (ResourceObj::C_HEAP)
+ GrowableArray<jweak>* method_refs = new (ResourceObj::C_HEAP, mtClass)
GrowableArray<jweak>(emcp_method_count, true);
for (int i = 0; i < old_methods->length(); i++) {
if (emcp_methods->at(i)) {
@@ -2948,7 +2948,7 @@
while (_current_index < length) {
PreviousVersionNode * pv_node = _previous_versions->at(_current_index++);
- PreviousVersionInfo * pv_info = new (ResourceObj::C_HEAP)
+ PreviousVersionInfo * pv_info = new (ResourceObj::C_HEAP, mtClass)
PreviousVersionInfo(pv_node);
constantPoolHandle cp_h = pv_info->prev_constant_pool_handle();