src/share/vm/code/codeBlob.cpp
Print this page
@@ -242,22 +242,19 @@
MemoryService::track_code_cache_memory_usage();
return blob;
}
-
void* BufferBlob::operator new(size_t s, unsigned size) throw() {
- void* p = CodeCache::allocate(size);
- return p;
+ return CodeCache::allocate(size, btNonMethod);
}
-
-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, btNonMethod);
}
// Track memory usage statistic after releasing CodeCache_lock
MemoryService::track_code_cache_memory_usage();
}
@@ -305,11 +302,10 @@
MemoryService::track_code_cache_memory_usage();
return blob;
}
-
//----------------------------------------------------------------------------------------------------
// Implementation of RuntimeStub
RuntimeStub::RuntimeStub(
const char* name,
@@ -346,18 +342,18 @@
return stub;
}
void* RuntimeStub::operator new(size_t s, unsigned size) throw() {
- void* p = CodeCache::allocate(size, true);
+ void* p = CodeCache::allocate(size, btNonMethod, 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, btNonMethod, true);
if (!p) fatal("Initial size of CodeCache is too small");
return p;
}