1.1 --- a/src/share/vm/prims/unsafe.cpp Wed Jun 27 15:23:36 2012 +0200 1.2 +++ b/src/share/vm/prims/unsafe.cpp Thu Jun 28 17:03:16 2012 -0400 1.3 @@ -596,7 +596,7 @@ 1.4 return 0; 1.5 } 1.6 sz = round_to(sz, HeapWordSize); 1.7 - void* x = os::malloc(sz); 1.8 + void* x = os::malloc(sz, mtInternal); 1.9 if (x == NULL) { 1.10 THROW_0(vmSymbols::java_lang_OutOfMemoryError()); 1.11 } 1.12 @@ -616,7 +616,7 @@ 1.13 return 0; 1.14 } 1.15 sz = round_to(sz, HeapWordSize); 1.16 - void* x = (p == NULL) ? os::malloc(sz) : os::realloc(p, sz); 1.17 + void* x = (p == NULL) ? os::malloc(sz, mtInternal) : os::realloc(p, sz, mtInternal); 1.18 if (x == NULL) { 1.19 THROW_0(vmSymbols::java_lang_OutOfMemoryError()); 1.20 } 1.21 @@ -877,7 +877,7 @@ 1.22 return 0; 1.23 } 1.24 1.25 - body = NEW_C_HEAP_ARRAY(jbyte, length); 1.26 + body = NEW_C_HEAP_ARRAY(jbyte, length, mtInternal); 1.27 1.28 if (body == 0) { 1.29 throw_new(env, "OutOfMemoryError"); 1.30 @@ -893,7 +893,7 @@ 1.31 uint len = env->GetStringUTFLength(name); 1.32 int unicode_len = env->GetStringLength(name); 1.33 if (len >= sizeof(buf)) { 1.34 - utfName = NEW_C_HEAP_ARRAY(char, len + 1); 1.35 + utfName = NEW_C_HEAP_ARRAY(char, len + 1, mtInternal); 1.36 if (utfName == NULL) { 1.37 throw_new(env, "OutOfMemoryError"); 1.38 goto free_body; 1.39 @@ -913,10 +913,10 @@ 1.40 result = JVM_DefineClass(env, utfName, loader, body, length, pd); 1.41 1.42 if (utfName && utfName != buf) 1.43 - FREE_C_HEAP_ARRAY(char, utfName); 1.44 + FREE_C_HEAP_ARRAY(char, utfName, mtInternal); 1.45 1.46 free_body: 1.47 - FREE_C_HEAP_ARRAY(jbyte, body); 1.48 + FREE_C_HEAP_ARRAY(jbyte, body, mtInternal); 1.49 return result; 1.50 } 1.51 } 1.52 @@ -1011,7 +1011,7 @@ 1.53 1.54 jint length = typeArrayOop(JNIHandles::resolve_non_null(data))->length(); 1.55 jint word_length = (length + sizeof(HeapWord)-1) / sizeof(HeapWord); 1.56 - HeapWord* body = NEW_C_HEAP_ARRAY(HeapWord, word_length); 1.57 + HeapWord* body = NEW_C_HEAP_ARRAY(HeapWord, word_length, mtInternal); 1.58 if (body == NULL) { 1.59 THROW_0(vmSymbols::java_lang_OutOfMemoryError()); 1.60 } 1.61 @@ -1095,7 +1095,7 @@ 1.62 1.63 // try/finally clause: 1.64 if (temp_alloc != NULL) { 1.65 - FREE_C_HEAP_ARRAY(HeapWord, temp_alloc); 1.66 + FREE_C_HEAP_ARRAY(HeapWord, temp_alloc, mtInternal); 1.67 } 1.68 1.69 return (jclass) res_jh;