6970566: runThese fails with SIGSEGV

Reviewed-by: kvn
This commit is contained in:
Tom Rodriguez 2010-07-22 15:29:22 -07:00
parent 7e34622217
commit 762e078636
2 changed files with 6 additions and 3 deletions

View File

@ -202,6 +202,11 @@ void BufferBlob::free( BufferBlob *blob ) {
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
// Implementation of AdapterBlob // Implementation of AdapterBlob
AdapterBlob::AdapterBlob(int size, CodeBuffer* cb) :
BufferBlob("I2C/C2I adapters", size, cb) {
CodeCache::commit(this);
}
AdapterBlob* AdapterBlob::create(CodeBuffer* cb) { AdapterBlob* AdapterBlob::create(CodeBuffer* cb) {
ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock
@ -210,7 +215,6 @@ AdapterBlob* AdapterBlob::create(CodeBuffer* cb) {
{ {
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
blob = new (size) AdapterBlob(size, cb); blob = new (size) AdapterBlob(size, cb);
CodeCache::commit(blob);
} }
// Track memory usage statistic after releasing CodeCache_lock // Track memory usage statistic after releasing CodeCache_lock
MemoryService::track_code_cache_memory_usage(); MemoryService::track_code_cache_memory_usage();

View File

@ -219,8 +219,7 @@ class BufferBlob: public CodeBlob {
class AdapterBlob: public BufferBlob { class AdapterBlob: public BufferBlob {
private: private:
AdapterBlob(int size) : BufferBlob("I2C/C2I adapters", size) {} AdapterBlob(int size, CodeBuffer* cb);
AdapterBlob(int size, CodeBuffer* cb) : BufferBlob("I2C/C2I adapters", size, cb) {}
public: public:
// Creation // Creation