mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
6995781: Native Memory Tracking (Phase 1)
7151532: DCmd for hotspot native memory tracking Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd Reviewed-by: acorn, coleenp, fparain
This commit is contained in:
parent
8e42425c92
commit
a39b17624a
315 changed files with 7245 additions and 1477 deletions
|
@ -52,7 +52,7 @@ class JvmtiTagMap;
|
|||
// done via JNI GetEnv() call. Multiple attachments are
|
||||
// allowed in jvmti.
|
||||
|
||||
class JvmtiEnvBase : public CHeapObj {
|
||||
class JvmtiEnvBase : public CHeapObj<mtInternal> {
|
||||
|
||||
private:
|
||||
|
||||
|
@ -175,7 +175,7 @@ class JvmtiEnvBase : public CHeapObj {
|
|||
if (size == 0) {
|
||||
*mem_ptr = NULL;
|
||||
} else {
|
||||
*mem_ptr = (unsigned char *)os::malloc((size_t)size);
|
||||
*mem_ptr = (unsigned char *)os::malloc((size_t)size, mtInternal);
|
||||
if (*mem_ptr == NULL) {
|
||||
return JVMTI_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ class JvmtiEnvBase : public CHeapObj {
|
|||
|
||||
jvmtiError deallocate(unsigned char* mem) {
|
||||
if (mem != NULL) {
|
||||
os::free(mem);
|
||||
os::free(mem, mtInternal);
|
||||
}
|
||||
return JVMTI_ERROR_NONE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue