src/share/vm/code/codeBlob.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8015774 Cdiff src/share/vm/code/codeBlob.cpp
src/share/vm/code/codeBlob.cpp
Print this page
*** 242,263 ****
MemoryService::track_code_cache_memory_usage();
return blob;
}
-
void* BufferBlob::operator new(size_t s, unsigned size, bool is_critical) throw() {
! void* p = CodeCache::allocate(size, is_critical);
! return p;
}
!
! 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);
}
// Track memory usage statistic after releasing CodeCache_lock
MemoryService::track_code_cache_memory_usage();
}
--- 242,260 ----
MemoryService::track_code_cache_memory_usage();
return blob;
}
void* BufferBlob::operator new(size_t s, unsigned size, bool is_critical) throw() {
! return CodeCache::allocate(size, CodeBlobType::NonMethod, is_critical);
}
! 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, CodeBlobType::NonMethod);
}
// Track memory usage statistic after releasing CodeCache_lock
MemoryService::track_code_cache_memory_usage();
}
*** 311,321 ****
MemoryService::track_code_cache_memory_usage();
return blob;
}
-
//----------------------------------------------------------------------------------------------------
// Implementation of RuntimeStub
RuntimeStub::RuntimeStub(
const char* name,
--- 308,317 ----
*** 352,369 ****
return stub;
}
void* RuntimeStub::operator new(size_t s, unsigned size) throw() {
! void* p = CodeCache::allocate(size, 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);
if (!p) fatal("Initial size of CodeCache is too small");
return p;
}
--- 348,365 ----
return stub;
}
void* RuntimeStub::operator new(size_t s, unsigned size) throw() {
! 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, CodeBlobType::NonMethod, true);
if (!p) fatal("Initial size of CodeCache is too small");
return p;
}
src/share/vm/code/codeBlob.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File