< prev index next >

src/hotspot/share/memory/metaspace.cpp

Print this page




1204   }
1205 
1206   set_compressed_class_space_size(CompressedClassSpaceSize);
1207 }
1208 
1209 void Metaspace::global_initialize() {
1210   MetaspaceGC::initialize();
1211 
1212 #if INCLUDE_CDS
1213   if (DumpSharedSpaces) {
1214     MetaspaceShared::initialize_dumptime_shared_and_meta_spaces();
1215   } else if (UseSharedSpaces) {
1216     // If any of the archived space fails to map, UseSharedSpaces
1217     // is reset to false. Fall through to the
1218     // (!DumpSharedSpaces && !UseSharedSpaces) case to set up class
1219     // metaspace.
1220     MetaspaceShared::initialize_runtime_shared_and_meta_spaces();
1221   }
1222 
1223   if (DynamicDumpSharedSpaces && !UseSharedSpaces) {
1224     vm_exit_during_initialization("DynamicDumpSharedSpaces is unsupported when base CDS archive is not loaded", NULL);
1225   }
1226 
1227   if (!DumpSharedSpaces && !UseSharedSpaces)
1228 #endif // INCLUDE_CDS
1229   {
1230 #ifdef _LP64
1231     if (using_class_space()) {
1232       char* base = (char*)align_up(Universe::heap()->reserved_region().end(), _reserve_alignment);
1233       allocate_metaspace_compressed_klass_ptrs(base, 0);
1234     }
1235 #endif // _LP64
1236   }
1237 
1238   // Initialize these before initializing the VirtualSpaceList
1239   _first_chunk_word_size = InitialBootClassLoaderMetaspaceSize / BytesPerWord;
1240   _first_chunk_word_size = align_word_size_up(_first_chunk_word_size);
1241   // Make the first class chunk bigger than a medium chunk so it's not put
1242   // on the medium chunk list.   The next chunk will be small and progress
1243   // from there.  This size calculated by -version.
1244   _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,




1204   }
1205 
1206   set_compressed_class_space_size(CompressedClassSpaceSize);
1207 }
1208 
1209 void Metaspace::global_initialize() {
1210   MetaspaceGC::initialize();
1211 
1212 #if INCLUDE_CDS
1213   if (DumpSharedSpaces) {
1214     MetaspaceShared::initialize_dumptime_shared_and_meta_spaces();
1215   } else if (UseSharedSpaces) {
1216     // If any of the archived space fails to map, UseSharedSpaces
1217     // is reset to false. Fall through to the
1218     // (!DumpSharedSpaces && !UseSharedSpaces) case to set up class
1219     // metaspace.
1220     MetaspaceShared::initialize_runtime_shared_and_meta_spaces();
1221   }
1222 
1223   if (DynamicDumpSharedSpaces && !UseSharedSpaces) {
1224     vm_exit_during_initialization("DynamicDumpSharedSpaces not supported when base CDS archive is not loaded", NULL);
1225   }
1226 
1227   if (!DumpSharedSpaces && !UseSharedSpaces)
1228 #endif // INCLUDE_CDS
1229   {
1230 #ifdef _LP64
1231     if (using_class_space()) {
1232       char* base = (char*)align_up(Universe::heap()->reserved_region().end(), _reserve_alignment);
1233       allocate_metaspace_compressed_klass_ptrs(base, 0);
1234     }
1235 #endif // _LP64
1236   }
1237 
1238   // Initialize these before initializing the VirtualSpaceList
1239   _first_chunk_word_size = InitialBootClassLoaderMetaspaceSize / BytesPerWord;
1240   _first_chunk_word_size = align_word_size_up(_first_chunk_word_size);
1241   // Make the first class chunk bigger than a medium chunk so it's not put
1242   // on the medium chunk list.   The next chunk will be small and progress
1243   // from there.  This size calculated by -version.
1244   _first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,


< prev index next >