comparison src/share/vm/prims/jvmtiEnvBase.cpp @ 6275:957c266d8bc5

Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Tue, 21 Aug 2012 10:39:19 +0200
parents 0ebca2e35ca5 d2a62e0f25eb
children e522a00b91aa
comparison
equal deleted inserted replaced
5891:fd8832ae511d 6275:957c266d8bc5
379 if (prefix_count == 0 || !is_valid()) { 379 if (prefix_count == 0 || !is_valid()) {
380 _native_method_prefix_count = 0; 380 _native_method_prefix_count = 0;
381 _native_method_prefixes = NULL; 381 _native_method_prefixes = NULL;
382 } else { 382 } else {
383 // there are prefixes, allocate an array to hold them, and fill it 383 // there are prefixes, allocate an array to hold them, and fill it
384 char** new_prefixes = (char**)os::malloc((prefix_count) * sizeof(char*)); 384 char** new_prefixes = (char**)os::malloc((prefix_count) * sizeof(char*), mtInternal);
385 if (new_prefixes == NULL) { 385 if (new_prefixes == NULL) {
386 return JVMTI_ERROR_OUT_OF_MEMORY; 386 return JVMTI_ERROR_OUT_OF_MEMORY;
387 } 387 }
388 for (int i = 0; i < prefix_count; i++) { 388 for (int i = 0; i < prefix_count; i++) {
389 char* prefix = prefixes[i]; 389 char* prefix = prefixes[i];
1148 return JVMTI_ERROR_NONE; 1148 return JVMTI_ERROR_NONE;
1149 } 1149 }
1150 1150
1151 ResourceTracker::ResourceTracker(JvmtiEnv* env) { 1151 ResourceTracker::ResourceTracker(JvmtiEnv* env) {
1152 _env = env; 1152 _env = env;
1153 _allocations = new (ResourceObj::C_HEAP) GrowableArray<unsigned char*>(20, true); 1153 _allocations = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<unsigned char*>(20, true);
1154 _failed = false; 1154 _failed = false;
1155 } 1155 }
1156 ResourceTracker::~ResourceTracker() { 1156 ResourceTracker::~ResourceTracker() {
1157 if (_failed) { 1157 if (_failed) {
1158 for (int i=0; i<_allocations->length(); i++) { 1158 for (int i=0; i<_allocations->length(); i++) {