Mercurial > hg > truffle
diff src/share/vm/libadt/set.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 | f95d63e2154a |
children | b9a9ed0f8eeb |
line wrap: on
line diff
--- a/src/share/vm/libadt/set.cpp Wed Jun 27 15:23:36 2012 +0200 +++ b/src/share/vm/libadt/set.cpp Thu Jun 28 17:03:16 2012 -0400 @@ -71,7 +71,7 @@ set.Sort(); // Sort elements for in-order retrieval uint len = 128; // Total string space - char *buf = NEW_C_HEAP_ARRAY(char,len);// Some initial string space + char *buf = NEW_C_HEAP_ARRAY(char,len, mtCompiler);// Some initial string space register char *s = buf; // Current working string pointer *s++ = '{'; @@ -86,7 +86,7 @@ if( buf+len-s < 25 ) { // Generous trailing space for upcoming numbers int offset = (int)(s-buf);// Not enuf space; compute offset into buffer len <<= 1; // Double string size - buf = REALLOC_C_HEAP_ARRAY(char,buf,len); // Reallocate doubled size + buf = REALLOC_C_HEAP_ARRAY(char,buf,len, mtCompiler); // Reallocate doubled size s = buf+offset; // Get working pointer into new bigger buffer } if( lo != (uint)-2 ) { // Startup? No! Then print previous range. @@ -101,7 +101,7 @@ if( buf+len-s < 25 ) { // Generous trailing space for upcoming numbers int offset = (int)(s-buf);// Not enuf space; compute offset into buffer len <<= 1; // Double string size - buf = (char*)ReallocateHeap(buf,len); // Reallocate doubled size + buf = (char*)ReallocateHeap(buf,len, mtCompiler); // Reallocate doubled size s = buf+offset; // Get working pointer into new bigger buffer } if( lo != hi ) sprintf(s,"%d-%d}",lo,hi);