src/share/vm/code/codeBlob.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/code/codeBlob.cpp

src/share/vm/code/codeBlob.cpp

Print this page

        

*** 227,238 **** 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::NonNMethod, is_critical); } void BufferBlob::free(BufferBlob *blob) { ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock blob->flush(); --- 227,238 ---- MemoryService::track_code_cache_memory_usage(); return blob; } ! void* BufferBlob::operator new(size_t s, unsigned size) throw() { ! return CodeCache::allocate(size, CodeBlobType::NonNMethod); } void BufferBlob::free(BufferBlob *blob) { ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock blob->flush();
*** 258,271 **** AdapterBlob* blob = NULL; unsigned int size = allocation_size(cb, sizeof(AdapterBlob)); { MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); ! // 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; --- 258,268 ---- 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); } // Track memory usage statistic after releasing CodeCache_lock MemoryService::track_code_cache_memory_usage(); return blob;
*** 283,296 **** // 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); ! // 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; --- 280,290 ---- // 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); } // Track memory usage statistic after releasing CodeCache_lock MemoryService::track_code_cache_memory_usage(); return blob;
*** 334,351 **** return stub; } void* RuntimeStub::operator new(size_t s, unsigned size) throw() { ! void* p = CodeCache::allocate(size, CodeBlobType::NonNMethod, 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::NonNMethod, true); if (!p) fatal("Initial size of CodeCache is too small"); return p; } --- 328,345 ---- return stub; } void* RuntimeStub::operator new(size_t s, unsigned size) throw() { ! void* p = CodeCache::allocate(size, CodeBlobType::NonNMethod); 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::NonNMethod); 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