mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8054292: code comments leak in fastdebug builds
Added deallocation to destructor; hardened interface against misuse Reviewed-by: kvn
This commit is contained in:
parent
3eb44b3955
commit
4c9f643e10
5 changed files with 81 additions and 11 deletions
|
@ -238,6 +238,7 @@ void* BufferBlob::operator new(size_t s, unsigned size, bool is_critical) throw(
|
|||
|
||||
void BufferBlob::free( BufferBlob *blob ) {
|
||||
ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock
|
||||
blob->flush();
|
||||
{
|
||||
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||
CodeCache::free((CodeBlob*)blob);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue