Mercurial > hg > graal-jvmci-8
diff src/share/vm/asm/codeBuffer.cpp @ 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 | 44ce519bc3d1 |
children | 957c266d8bc5 da91efe96a93 |
line wrap: on
line diff
--- a/src/share/vm/asm/codeBuffer.cpp Wed Jun 27 15:23:36 2012 +0200 +++ b/src/share/vm/asm/codeBuffer.cpp Thu Jun 28 17:03:16 2012 -0400 @@ -261,7 +261,7 @@ GrowableArray<int>* CodeBuffer::create_patch_overflow() { if (_overflow_arena == NULL) { - _overflow_arena = new Arena(); + _overflow_arena = new (mtCode) Arena(); } return new (_overflow_arena) GrowableArray<int>(_overflow_arena, 8, 0, 0); } @@ -910,7 +910,7 @@ _comments.add_comment(offset, comment); } -class CodeComment: public CHeapObj { +class CodeComment: public CHeapObj<mtCode> { private: friend class CodeComments; intptr_t _offset; @@ -919,13 +919,13 @@ ~CodeComment() { assert(_next == NULL, "wrong interface for freeing list"); - os::free((void*)_comment); + os::free((void*)_comment, mtCode); } public: CodeComment(intptr_t offset, const char * comment) { _offset = offset; - _comment = os::strdup(comment); + _comment = os::strdup(comment, mtCode); _next = NULL; }