< prev index next >

src/hotspot/share/oops/instanceKlass.cpp

Print this page

        

*** 585,597 **** // For class redefinition, we keep the original class so this scratch class // doesn't have an array class. Either way, assert that there is nothing // to deallocate. assert(array_klasses() == NULL, "array classes shouldn't be created for this class yet"); ! // Release C heap allocated data that this might point to, which includes // reference counting symbol names. ! release_C_heap_structures(); deallocate_methods(loader_data, methods()); set_methods(NULL); deallocate_record_components(loader_data, record_components()); --- 585,597 ---- // For class redefinition, we keep the original class so this scratch class // doesn't have an array class. Either way, assert that there is nothing // to deallocate. assert(array_klasses() == NULL, "array classes shouldn't be created for this class yet"); ! // Release C heap allocated data that this points to, which includes // reference counting symbol names. ! release_C_heap_structures_internal(); deallocate_methods(loader_data, methods()); set_methods(NULL); deallocate_record_components(loader_data, record_components());
*** 2384,2394 **** it->push(&_annotations); it->push((Klass**)&_array_klasses); it->push(&_constants); it->push(&_inner_classes); - it->push(&_array_name); #if INCLUDE_JVMTI it->push(&_previous_versions); #endif it->push(&_methods); it->push(&_default_methods); --- 2384,2393 ----
*** 2579,2599 **** static void method_release_C_heap_structures(Method* m) { m->release_C_heap_structures(); } ! void InstanceKlass::release_C_heap_structures(InstanceKlass* ik) { // Clean up C heap ! ik->release_C_heap_structures(); ! ik->constants()->release_C_heap_structures(); // Deallocate and call destructors for MDO mutexes ! ik->methods_do(method_release_C_heap_structures); ! } ! void InstanceKlass::release_C_heap_structures() { // Can't release the constant pool here because the constant pool can be // deallocated separately from the InstanceKlass for default methods and // redefine classes. // Deallocate oop map cache --- 2578,2600 ---- static void method_release_C_heap_structures(Method* m) { m->release_C_heap_structures(); } ! void InstanceKlass::release_C_heap_structures() { ! // Clean up C heap ! release_C_heap_structures_internal(); ! constants()->release_C_heap_structures(); // Deallocate and call destructors for MDO mutexes ! methods_do(method_release_C_heap_structures); } ! void InstanceKlass::release_C_heap_structures_internal() { ! Klass::release_C_heap_structures(); ! // Can't release the constant pool here because the constant pool can be // deallocated separately from the InstanceKlass for default methods and // redefine classes. // Deallocate oop map cache
*** 2627,2642 **** os::free(_cached_class_file); _cached_class_file = NULL; } #endif - // Decrement symbol reference counts associated with the unloaded class. - if (_name != NULL) _name->decrement_refcount(); - - // unreference array name derived from this class name (arrays of an unloaded - // class can't be referenced anymore). - if (_array_name != NULL) _array_name->decrement_refcount(); FREE_C_HEAP_ARRAY(char, _source_debug_extension); } void InstanceKlass::set_source_debug_extension(const char* array, int length) { if (array == NULL) { --- 2628,2637 ----
< prev index next >