src/share/vm/memory/universe.cpp

Print this page




 133 oop Universe::_short_mirror                           = NULL;
 134 oop Universe::_void_mirror                            = NULL;
 135 oop Universe::_mirrors[T_VOID+1]                      = { NULL /*, NULL...*/ };
 136 oop Universe::_main_thread_group                      = NULL;
 137 oop Universe::_system_thread_group                    = NULL;
 138 typeArrayOop Universe::_the_empty_byte_array          = NULL;
 139 typeArrayOop Universe::_the_empty_short_array         = NULL;
 140 typeArrayOop Universe::_the_empty_int_array           = NULL;
 141 objArrayOop Universe::_the_empty_system_obj_array     = NULL;
 142 objArrayOop Universe::_the_empty_class_klass_array    = NULL;
 143 objArrayOop Universe::_the_array_interfaces_array     = NULL;
 144 oop Universe::_the_null_string                        = NULL;
 145 oop Universe::_the_min_jint_string                   = NULL;
 146 LatestMethodOopCache* Universe::_finalizer_register_cache = NULL;
 147 LatestMethodOopCache* Universe::_loader_addClass_cache    = NULL;
 148 ActiveMethodOopsCache* Universe::_reflect_invoke_cache    = NULL;
 149 oop Universe::_out_of_memory_error_java_heap          = NULL;
 150 oop Universe::_out_of_memory_error_perm_gen           = NULL;
 151 oop Universe::_out_of_memory_error_array_size         = NULL;
 152 oop Universe::_out_of_memory_error_gc_overhead_limit  = NULL;

 153 objArrayOop Universe::_preallocated_out_of_memory_error_array = NULL;
 154 volatile jint Universe::_preallocated_out_of_memory_error_avail_count = 0;
 155 bool Universe::_verify_in_progress                    = false;
 156 oop Universe::_null_ptr_exception_instance            = NULL;
 157 oop Universe::_arithmetic_exception_instance          = NULL;
 158 oop Universe::_virtual_machine_error_instance         = NULL;
 159 oop Universe::_vm_exception                           = NULL;
 160 
 161 // These variables are guarded by FullGCALot_lock.
 162 debug_only(objArrayOop Universe::_fullgc_alot_dummy_array = NULL;)
 163 debug_only(int Universe::_fullgc_alot_dummy_next      = 0;)
 164 
 165 
 166 // Heap
 167 int             Universe::_verify_count = 0;
 168 
 169 int             Universe::_base_vtable_size = 0;
 170 bool            Universe::_bootstrapping = false;
 171 bool            Universe::_fully_initialized = false;
 172 


 252   f->do_oop((oop*)&_instanceKlassKlassObj);
 253   f->do_oop((oop*)&_constantPoolKlassObj);
 254   f->do_oop((oop*)&_constantPoolCacheKlassObj);
 255   f->do_oop((oop*)&_compiledICHolderKlassObj);
 256   f->do_oop((oop*)&_systemObjArrayKlassObj);
 257   f->do_oop((oop*)&_the_empty_byte_array);
 258   f->do_oop((oop*)&_the_empty_short_array);
 259   f->do_oop((oop*)&_the_empty_int_array);
 260   f->do_oop((oop*)&_the_empty_system_obj_array);
 261   f->do_oop((oop*)&_the_empty_class_klass_array);
 262   f->do_oop((oop*)&_the_array_interfaces_array);
 263   f->do_oop((oop*)&_the_null_string);
 264   f->do_oop((oop*)&_the_min_jint_string);
 265   _finalizer_register_cache->oops_do(f);
 266   _loader_addClass_cache->oops_do(f);
 267   _reflect_invoke_cache->oops_do(f);
 268   f->do_oop((oop*)&_out_of_memory_error_java_heap);
 269   f->do_oop((oop*)&_out_of_memory_error_perm_gen);
 270   f->do_oop((oop*)&_out_of_memory_error_array_size);
 271   f->do_oop((oop*)&_out_of_memory_error_gc_overhead_limit);



 272   if (_preallocated_out_of_memory_error_array != (oop)NULL) {   // NULL when DumpSharedSpaces
 273     f->do_oop((oop*)&_preallocated_out_of_memory_error_array);
 274   }
 275   f->do_oop((oop*)&_null_ptr_exception_instance);
 276   f->do_oop((oop*)&_arithmetic_exception_instance);
 277   f->do_oop((oop*)&_virtual_machine_error_instance);
 278   f->do_oop((oop*)&_main_thread_group);
 279   f->do_oop((oop*)&_system_thread_group);
 280   f->do_oop((oop*)&_vm_exception);
 281   debug_only(f->do_oop((oop*)&_fullgc_alot_dummy_array);)
 282 }
 283 
 284 
 285 void Universe::check_alignment(uintx size, uintx alignment, const char* name) {
 286   if (size < alignment || size % alignment != 0) {
 287     ResourceMark rm;
 288     stringStream st;
 289     st.print("Size of %s (%ld bytes) must be aligned to %ld bytes", name, size, alignment);
 290     char* error = st.as_string();
 291     vm_exit_during_initialization(error);




 133 oop Universe::_short_mirror                           = NULL;
 134 oop Universe::_void_mirror                            = NULL;
 135 oop Universe::_mirrors[T_VOID+1]                      = { NULL /*, NULL...*/ };
 136 oop Universe::_main_thread_group                      = NULL;
 137 oop Universe::_system_thread_group                    = NULL;
 138 typeArrayOop Universe::_the_empty_byte_array          = NULL;
 139 typeArrayOop Universe::_the_empty_short_array         = NULL;
 140 typeArrayOop Universe::_the_empty_int_array           = NULL;
 141 objArrayOop Universe::_the_empty_system_obj_array     = NULL;
 142 objArrayOop Universe::_the_empty_class_klass_array    = NULL;
 143 objArrayOop Universe::_the_array_interfaces_array     = NULL;
 144 oop Universe::_the_null_string                        = NULL;
 145 oop Universe::_the_min_jint_string                   = NULL;
 146 LatestMethodOopCache* Universe::_finalizer_register_cache = NULL;
 147 LatestMethodOopCache* Universe::_loader_addClass_cache    = NULL;
 148 ActiveMethodOopsCache* Universe::_reflect_invoke_cache    = NULL;
 149 oop Universe::_out_of_memory_error_java_heap          = NULL;
 150 oop Universe::_out_of_memory_error_perm_gen           = NULL;
 151 oop Universe::_out_of_memory_error_array_size         = NULL;
 152 oop Universe::_out_of_memory_error_gc_overhead_limit  = NULL;
 153 oop Universe::_primordial_loader_cache                = NULL;
 154 objArrayOop Universe::_preallocated_out_of_memory_error_array = NULL;
 155 volatile jint Universe::_preallocated_out_of_memory_error_avail_count = 0;
 156 bool Universe::_verify_in_progress                    = false;
 157 oop Universe::_null_ptr_exception_instance            = NULL;
 158 oop Universe::_arithmetic_exception_instance          = NULL;
 159 oop Universe::_virtual_machine_error_instance         = NULL;
 160 oop Universe::_vm_exception                           = NULL;
 161 
 162 // These variables are guarded by FullGCALot_lock.
 163 debug_only(objArrayOop Universe::_fullgc_alot_dummy_array = NULL;)
 164 debug_only(int Universe::_fullgc_alot_dummy_next      = 0;)
 165 
 166 
 167 // Heap
 168 int             Universe::_verify_count = 0;
 169 
 170 int             Universe::_base_vtable_size = 0;
 171 bool            Universe::_bootstrapping = false;
 172 bool            Universe::_fully_initialized = false;
 173 


 253   f->do_oop((oop*)&_instanceKlassKlassObj);
 254   f->do_oop((oop*)&_constantPoolKlassObj);
 255   f->do_oop((oop*)&_constantPoolCacheKlassObj);
 256   f->do_oop((oop*)&_compiledICHolderKlassObj);
 257   f->do_oop((oop*)&_systemObjArrayKlassObj);
 258   f->do_oop((oop*)&_the_empty_byte_array);
 259   f->do_oop((oop*)&_the_empty_short_array);
 260   f->do_oop((oop*)&_the_empty_int_array);
 261   f->do_oop((oop*)&_the_empty_system_obj_array);
 262   f->do_oop((oop*)&_the_empty_class_klass_array);
 263   f->do_oop((oop*)&_the_array_interfaces_array);
 264   f->do_oop((oop*)&_the_null_string);
 265   f->do_oop((oop*)&_the_min_jint_string);
 266   _finalizer_register_cache->oops_do(f);
 267   _loader_addClass_cache->oops_do(f);
 268   _reflect_invoke_cache->oops_do(f);
 269   f->do_oop((oop*)&_out_of_memory_error_java_heap);
 270   f->do_oop((oop*)&_out_of_memory_error_perm_gen);
 271   f->do_oop((oop*)&_out_of_memory_error_array_size);
 272   f->do_oop((oop*)&_out_of_memory_error_gc_overhead_limit);
 273   if (_primordial_loader_cache != (oop)NULL && _primordial_loader_cache != (oop)-1) {
 274     f->do_oop((oop*)&_primordial_loader_cache);
 275   }
 276   if (_preallocated_out_of_memory_error_array != (oop)NULL) {   // NULL when DumpSharedSpaces
 277     f->do_oop((oop*)&_preallocated_out_of_memory_error_array);
 278   }
 279   f->do_oop((oop*)&_null_ptr_exception_instance);
 280   f->do_oop((oop*)&_arithmetic_exception_instance);
 281   f->do_oop((oop*)&_virtual_machine_error_instance);
 282   f->do_oop((oop*)&_main_thread_group);
 283   f->do_oop((oop*)&_system_thread_group);
 284   f->do_oop((oop*)&_vm_exception);
 285   debug_only(f->do_oop((oop*)&_fullgc_alot_dummy_array);)
 286 }
 287 
 288 
 289 void Universe::check_alignment(uintx size, uintx alignment, const char* name) {
 290   if (size < alignment || size % alignment != 0) {
 291     ResourceMark rm;
 292     stringStream st;
 293     st.print("Size of %s (%ld bytes) must be aligned to %ld bytes", name, size, alignment);
 294     char* error = st.as_string();
 295     vm_exit_during_initialization(error);