--- old/src/share/vm/code/codeBlob.cpp 2013-10-09 15:17:15.032404552 +0200 +++ new/src/share/vm/code/codeBlob.cpp 2013-10-09 15:17:14.448404574 +0200 @@ -244,18 +244,15 @@ return blob; } - void* BufferBlob::operator new(size_t s, unsigned size) throw() { - void* p = CodeCache::allocate(size); - return p; + return CodeCache::allocate(size, CodeBlobType::NonMethod); } - -void BufferBlob::free( BufferBlob *blob ) { +void BufferBlob::free(BufferBlob *blob) { ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock { MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); - CodeCache::free((CodeBlob*)blob); + CodeCache::free((CodeBlob*)blob, CodeBlobType::NonMethod); } // Track memory usage statistic after releasing CodeCache_lock MemoryService::track_code_cache_memory_usage(); @@ -307,7 +304,6 @@ return blob; } - //---------------------------------------------------------------------------------------------------- // Implementation of RuntimeStub @@ -348,14 +344,14 @@ void* RuntimeStub::operator new(size_t s, unsigned size) throw() { - void* p = CodeCache::allocate(size, true); + void* p = CodeCache::allocate(size, CodeBlobType::NonMethod, true); if (!p) fatal("Initial size of CodeCache is too small"); return p; } // operator new shared by all singletons: void* SingletonBlob::operator new(size_t s, unsigned size) throw() { - void* p = CodeCache::allocate(size, true); + void* p = CodeCache::allocate(size, CodeBlobType::NonMethod, true); if (!p) fatal("Initial size of CodeCache is too small"); return p; }