1.1 --- a/src/share/vm/oops/instanceKlass.cpp Wed Jun 27 15:23:36 2012 +0200 1.2 +++ b/src/share/vm/oops/instanceKlass.cpp Thu Jun 28 17:03:16 2012 -0400 1.3 @@ -989,7 +989,7 @@ 1.4 fieldDescriptor fd; 1.5 int length = java_fields_count(); 1.6 // In DebugInfo nonstatic fields are sorted by offset. 1.7 - int* fields_sorted = NEW_C_HEAP_ARRAY(int, 2*(length+1)); 1.8 + int* fields_sorted = NEW_C_HEAP_ARRAY(int, 2*(length+1), mtClass); 1.9 int j = 0; 1.10 for (int i = 0; i < length; i += 1) { 1.11 fd.initialize(as_klassOop(), i); 1.12 @@ -1009,7 +1009,7 @@ 1.13 cl->do_field(&fd); 1.14 } 1.15 } 1.16 - FREE_C_HEAP_ARRAY(int, fields_sorted); 1.17 + FREE_C_HEAP_ARRAY(int, fields_sorted, mtClass); 1.18 } 1.19 1.20 1.21 @@ -1236,7 +1236,7 @@ 1.22 if (length <= idnum) { 1.23 // allocate a new cache that might be used 1.24 size_t size = MAX2(idnum+1, (size_t)ik_h->idnum_allocated_count()); 1.25 - new_jmeths = NEW_C_HEAP_ARRAY(jmethodID, size+1); 1.26 + new_jmeths = NEW_C_HEAP_ARRAY(jmethodID, size+1, mtClass); 1.27 memset(new_jmeths, 0, (size+1)*sizeof(jmethodID)); 1.28 // cache size is stored in element[0], other elements offset by one 1.29 new_jmeths[0] = (jmethodID)size; 1.30 @@ -1397,7 +1397,7 @@ 1.31 // cache size is stored in element[0], other elements offset by one 1.32 if (indices == NULL || (length = (size_t)indices[0]) <= idnum) { 1.33 size_t size = MAX2(idnum+1, (size_t)idnum_allocated_count()); 1.34 - int* new_indices = NEW_C_HEAP_ARRAY(int, size+1); 1.35 + int* new_indices = NEW_C_HEAP_ARRAY(int, size+1, mtClass); 1.36 new_indices[0] = (int)size; 1.37 // copy any existing entries 1.38 size_t i; 1.39 @@ -1933,7 +1933,7 @@ 1.40 1.41 // deallocate the cached class file 1.42 if (_cached_class_file_bytes != NULL) { 1.43 - os::free(_cached_class_file_bytes); 1.44 + os::free(_cached_class_file_bytes, mtClass); 1.45 _cached_class_file_bytes = NULL; 1.46 _cached_class_file_len = 0; 1.47 } 1.48 @@ -2530,7 +2530,7 @@ 1.49 // This is the first previous version so make some space. 1.50 // Start with 2 elements under the assumption that the class 1.51 // won't be redefined much. 1.52 - _previous_versions = new (ResourceObj::C_HEAP) 1.53 + _previous_versions = new (ResourceObj::C_HEAP, mtClass) 1.54 GrowableArray<PreviousVersionNode *>(2, true); 1.55 } 1.56 1.57 @@ -2556,7 +2556,7 @@ 1.58 ("add: all methods are obsolete; flushing any EMCP weak refs")); 1.59 } else { 1.60 int local_count = 0; 1.61 - GrowableArray<jweak>* method_refs = new (ResourceObj::C_HEAP) 1.62 + GrowableArray<jweak>* method_refs = new (ResourceObj::C_HEAP, mtClass) 1.63 GrowableArray<jweak>(emcp_method_count, true); 1.64 for (int i = 0; i < old_methods->length(); i++) { 1.65 if (emcp_methods->at(i)) { 1.66 @@ -2948,7 +2948,7 @@ 1.67 1.68 while (_current_index < length) { 1.69 PreviousVersionNode * pv_node = _previous_versions->at(_current_index++); 1.70 - PreviousVersionInfo * pv_info = new (ResourceObj::C_HEAP) 1.71 + PreviousVersionInfo * pv_info = new (ResourceObj::C_HEAP, mtClass) 1.72 PreviousVersionInfo(pv_node); 1.73 1.74 constantPoolHandle cp_h = pv_info->prev_constant_pool_handle();