Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/arguments.hpp @ 6197:d2a62e0f25eb
6995781: Native Memory Tracking (Phase 1)
7151532: DCmd for hotspot native memory tracking
Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd
Reviewed-by: acorn, coleenp, fparain
author | zgu |
---|---|
date | Thu, 28 Jun 2012 17:03:16 -0400 |
parents | a2c2eac1ca62 |
children | 957c266d8bc5 b9a9ed0f8eeb |
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.hpp Wed Jun 27 15:23:36 2012 +0200 +++ b/src/share/vm/runtime/arguments.hpp Thu Jun 28 17:03:16 2012 -0400 @@ -44,7 +44,7 @@ // Element describing System and User (-Dkey=value flags) defined property. -class SystemProperty: public CHeapObj { +class SystemProperty: public CHeapObj<mtInternal> { private: char* _key; char* _value; @@ -63,7 +63,7 @@ if (_value != NULL) { FreeHeap(_value); } - _value = AllocateHeap(strlen(value)+1); + _value = AllocateHeap(strlen(value)+1, mtInternal); if (_value != NULL) { strcpy(_value, value); } @@ -80,7 +80,7 @@ if (_value != NULL) { len += strlen(_value); } - sp = AllocateHeap(len+2); + sp = AllocateHeap(len+2, mtInternal); if (sp != NULL) { if (_value != NULL) { strcpy(sp, _value); @@ -100,13 +100,13 @@ if (key == NULL) { _key = NULL; } else { - _key = AllocateHeap(strlen(key)+1); + _key = AllocateHeap(strlen(key)+1, mtInternal); strcpy(_key, key); } if (value == NULL) { _value = NULL; } else { - _value = AllocateHeap(strlen(value)+1); + _value = AllocateHeap(strlen(value)+1, mtInternal); strcpy(_value, value); } _next = NULL; @@ -116,7 +116,7 @@ // For use by -agentlib, -agentpath and -Xrun -class AgentLibrary : public CHeapObj { +class AgentLibrary : public CHeapObj<mtInternal> { friend class AgentLibraryList; private: char* _name; @@ -136,12 +136,12 @@ // Constructor AgentLibrary(const char* name, const char* options, bool is_absolute_path, void* os_lib) { - _name = AllocateHeap(strlen(name)+1); + _name = AllocateHeap(strlen(name)+1, mtInternal); strcpy(_name, name); if (options == NULL) { _options = NULL; } else { - _options = AllocateHeap(strlen(options)+1); + _options = AllocateHeap(strlen(options)+1, mtInternal); strcpy(_options, options); } _is_absolute_path = is_absolute_path;