mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8199752: NMT: Memory allocated by Unsafe.allocateMemory should be tagged as mtOther
Tag memory allocation from Usafe.allocateMemory as external memory allocation Reviewed-by: coleenp, stuefe
This commit is contained in:
parent
0f92948d6f
commit
d6bd698077
2 changed files with 58 additions and 2 deletions
|
@ -367,7 +367,7 @@ UNSAFE_ENTRY(jlong, Unsafe_AllocateMemory0(JNIEnv *env, jobject unsafe, jlong si
|
|||
size_t sz = (size_t)size;
|
||||
|
||||
sz = align_up(sz, HeapWordSize);
|
||||
void* x = os::malloc(sz, mtInternal);
|
||||
void* x = os::malloc(sz, mtOther);
|
||||
|
||||
return addr_to_java(x);
|
||||
} UNSAFE_END
|
||||
|
@ -377,7 +377,7 @@ UNSAFE_ENTRY(jlong, Unsafe_ReallocateMemory0(JNIEnv *env, jobject unsafe, jlong
|
|||
size_t sz = (size_t)size;
|
||||
sz = align_up(sz, HeapWordSize);
|
||||
|
||||
void* x = os::realloc(p, sz, mtInternal);
|
||||
void* x = os::realloc(p, sz, mtOther);
|
||||
|
||||
return addr_to_java(x);
|
||||
} UNSAFE_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue