< prev index next >

src/share/vm/memory/metaspace.cpp

Print this page

        

*** 3567,3577 **** void Metaspace::deallocate(MetaWord* ptr, size_t word_size, bool is_class) { assert(!SafepointSynchronize::is_at_safepoint() || Thread::current()->is_VM_thread(), "should be the VM thread"); ! if (DumpSharedSpaces && PrintSharedSpaces) { record_deallocation(ptr, vsm()->get_allocation_word_size(word_size)); } MutexLockerEx ml(vsm()->lock(), Mutex::_no_safepoint_check_flag); --- 3567,3577 ---- void Metaspace::deallocate(MetaWord* ptr, size_t word_size, bool is_class) { assert(!SafepointSynchronize::is_at_safepoint() || Thread::current()->is_VM_thread(), "should be the VM thread"); ! if (DumpSharedSpaces && log_is_enabled(Info, cds)) { record_deallocation(ptr, vsm()->get_allocation_word_size(word_size)); } MutexLockerEx ml(vsm()->lock(), Mutex::_no_safepoint_check_flag);
*** 3601,3611 **** Metaspace* space = read_only ? loader_data->ro_metaspace() : loader_data->rw_metaspace(); MetaWord* result = space->allocate(word_size, NonClassType); if (result == NULL) { report_out_of_shared_space(read_only ? SharedReadOnly : SharedReadWrite); } ! if (PrintSharedSpaces) { space->record_allocation(result, type, space->vsm()->get_allocation_word_size(word_size)); } // Zero initialize. Copy::fill_to_words((HeapWord*)result, word_size, 0); --- 3601,3611 ---- Metaspace* space = read_only ? loader_data->ro_metaspace() : loader_data->rw_metaspace(); MetaWord* result = space->allocate(word_size, NonClassType); if (result == NULL) { report_out_of_shared_space(read_only ? SharedReadOnly : SharedReadWrite); } ! if (log_is_enabled(Info, cds)) { space->record_allocation(result, type, space->vsm()->get_allocation_word_size(word_size)); } // Zero initialize. Copy::fill_to_words((HeapWord*)result, word_size, 0);
< prev index next >