src/share/vm/code/codeBlob.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/code/codeBlob.cpp Wed Oct 9 06:56:39 2013
--- new/src/share/vm/code/codeBlob.cpp Wed Oct 9 06:56:39 2013
*** 243,254 ****
--- 243,254 ----
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 ) {
*** 275,285 ****
--- 275,288 ----
AdapterBlob* blob = NULL;
unsigned int size = allocation_size(cb, sizeof(AdapterBlob));
{
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
blob = new (size) AdapterBlob(size, cb);
+ // The parameter 'true' indicates a critical memory allocation.
+ // This means that CodeCacheMinimumFreeSpace is used, if necessary
+ const bool is_critical = true;
+ blob = new (size, is_critical) AdapterBlob(size, cb);
}
// Track memory usage statistic after releasing CodeCache_lock
MemoryService::track_code_cache_memory_usage();
return blob;
*** 297,307 ****
--- 300,313 ----
// align the size to CodeEntryAlignment
size = align_code_offset(size);
size += round_to(buffer_size, oopSize);
{
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
blob = new (size) MethodHandlesAdapterBlob(size);
+ // The parameter 'true' indicates a critical memory allocation.
+ // This means that CodeCacheMinimumFreeSpace is used, if necessary
+ const bool is_critical = true;
+ blob = new (size, is_critical) MethodHandlesAdapterBlob(size);
}
// Track memory usage statistic after releasing CodeCache_lock
MemoryService::track_code_cache_memory_usage();
return blob;
src/share/vm/code/codeBlob.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File