Mercurial > hg > truffle
comparison src/share/vm/code/codeBlob.cpp @ 20435:094cbdffa87d
8054292: code comments leak in fastdebug builds
Summary: Added deallocation to destructor; hardened interface against misuse
Reviewed-by: kvn
author | drchase |
---|---|
date | Fri, 29 Aug 2014 19:45:49 -0400 |
parents | 78bbf4d43a14 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20428:4d8781a35525 | 20435:094cbdffa87d |
---|---|
251 } | 251 } |
252 | 252 |
253 | 253 |
254 void BufferBlob::free( BufferBlob *blob ) { | 254 void BufferBlob::free( BufferBlob *blob ) { |
255 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | 255 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock |
256 blob->flush(); | |
256 { | 257 { |
257 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | 258 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
258 CodeCache::free((CodeBlob*)blob); | 259 CodeCache::free((CodeBlob*)blob); |
259 } | 260 } |
260 // Track memory usage statistic after releasing CodeCache_lock | 261 // Track memory usage statistic after releasing CodeCache_lock |