< prev index next >

src/hotspot/share/memory/metaspace.cpp

Print this page

        

*** 1516,1526 **** assert(!SafepointSynchronize::is_at_safepoint() || Thread::current()->is_VM_thread(), "should be the VM thread"); DEBUG_ONLY(Atomic::inc(&g_internal_statistics.num_external_deallocs)); ! MutexLockerEx ml(vsm()->lock(), Mutex::_no_safepoint_check_flag); if (is_class && Metaspace::using_class_space()) { class_vsm()->deallocate(ptr, word_size); } else { vsm()->deallocate(ptr, word_size); --- 1516,1527 ---- assert(!SafepointSynchronize::is_at_safepoint() || Thread::current()->is_VM_thread(), "should be the VM thread"); DEBUG_ONLY(Atomic::inc(&g_internal_statistics.num_external_deallocs)); ! MutexLockerEx ml(vsm()->lock()->owned_by_self() ? NULL : vsm()->lock(), ! Mutex::_no_safepoint_check_flag); if (is_class && Metaspace::using_class_space()) { class_vsm()->deallocate(ptr, word_size); } else { vsm()->deallocate(ptr, word_size);
< prev index next >