Mercurial > hg > graal-jvmci-8
diff src/share/vm/utilities/ostream.cpp @ 11173:6b0fd0964b87
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 31 Jul 2013 11:00:54 +0200 |
parents | b8f261ba79c6 dbc0b5dc08f5 |
children | cefad50507d8 |
line wrap: on
line diff
--- a/src/share/vm/utilities/ostream.cpp Tue Jul 30 13:03:28 2013 -0700 +++ b/src/share/vm/utilities/ostream.cpp Wed Jul 31 11:00:54 2013 +0200 @@ -296,6 +296,7 @@ buffer = NEW_RESOURCE_ARRAY(char, buffer_length); buffer_pos = 0; buffer_fixed = false; + DEBUG_ONLY(rm = Thread::current()->current_resource_mark();) } // useful for output to fixed chunks of memory, such as performance counters @@ -321,6 +322,8 @@ end = buffer_length * 2; } char* oldbuf = buffer; + assert(rm == NULL || Thread::current()->current_resource_mark() == rm, + "stringStream is re-allocated with a different ResourceMark"); buffer = NEW_RESOURCE_ARRAY(char, end); strncpy(buffer, oldbuf, buffer_pos); buffer_length = end;