src/share/vm/memory/universe.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File

## src/share/vm/memory/universe.cpp

Print this page

     656
     657   // Create memory for metadata.  Must be after initializing heap for
     658   // DumpSharedSpaces.
     659   ClassLoaderData::init_null_class_loader_data();
     660
     661   // We have a heap so create the Method* caches before
     662   // Metaspace::initialize_shared_spaces() tries to populate them.
     663   Universe::_finalizer_register_cache = new LatestMethodCache();
     664   Universe::_loader_addClass_cache    = new LatestMethodCache();
     665   Universe::_pd_implies_cache         = new LatestMethodCache();
     666
     667   if (UseSharedSpaces) {
     668     // Read the data structures supporting the shared spaces (shared
     669     // system dictionary, symbol table, etc.).  After that, access to
     670     // the file (other than the mapped regions) is no longer needed, and
     671     // the file is closed. Closing the file does not affect the
     672     // currently mapped regions.
     673     MetaspaceShared::initialize_shared_spaces();
     674     StringTable::create_table();
     675   } else {

     676     SymbolTable::create_table();

     677     StringTable::create_table();

     678     ClassLoader::create_package_info_table();
     679
     680     if (DumpSharedSpaces) {
     681       MetaspaceShared::prepare_for_dumping();
     682     }
     683   }
     684
     685   return JNI_OK;
     686 }
     687
     688 // Choose the heap base address and oop encoding mode
     689 // when compressed oops are used:
     690 // Unscaled  - Use 32-bits oops without encoding when
     691 //     NarrowOopHeapBaseMin + heap_size < 4Gb
     692 // ZeroBased - Use zero based compressed oops with encoding when
     693 //     NarrowOopHeapBaseMin + heap_size < 32Gb
     694 // HeapBased - Use compressed oops with heap base + encoding.
     695
     696 // 4Gb
     697 static const uint64_t UnscaledOopHeapMax = (uint64_t(max_juint) + 1);
     656
     657   // Create memory for metadata.  Must be after initializing heap for
     658   // DumpSharedSpaces.
     659   ClassLoaderData::init_null_class_loader_data();
     660
     661   // We have a heap so create the Method* caches before
     662   // Metaspace::initialize_shared_spaces() tries to populate them.
     663   Universe::_finalizer_register_cache = new LatestMethodCache();
     664   Universe::_loader_addClass_cache    = new LatestMethodCache();
     665   Universe::_pd_implies_cache         = new LatestMethodCache();
     666
     667   if (UseSharedSpaces) {
     668     // Read the data structures supporting the shared spaces (shared
     669     // system dictionary, symbol table, etc.).  After that, access to
     670     // the file (other than the mapped regions) is no longer needed, and
     671     // the file is closed. Closing the file does not affect the
     672     // currently mapped regions.
     673     MetaspaceShared::initialize_shared_spaces();
     674     StringTable::create_table();
     675   } else {
     676 #ifdef PRINT_HASHTABLES_CREATION
     677   fprintf(stderr, ">>>>> Creating SymbolTable\n");
     678 #endif
     679     SymbolTable::create_table();
     680 #ifdef PRINT_HASHTABLES_CREATION
     681   fprintf(stderr, ">>>>> Creating StringTable\n");
     682 #endif
     683     StringTable::create_table();
     684 #ifdef PRINT_HASHTABLES_CREATION
     685   fprintf(stderr, ">>>>> Creating ClassLoader PackageHashtable\n");
     686 #endif
     687     ClassLoader::create_package_info_table();
     688
     689     if (DumpSharedSpaces) {
     690       MetaspaceShared::prepare_for_dumping();
     691     }
     692   }
     693
     694   return JNI_OK;
     695 }
     696
     697 // Choose the heap base address and oop encoding mode
     698 // when compressed oops are used:
     699 // Unscaled  - Use 32-bits oops without encoding when
     700 //     NarrowOopHeapBaseMin + heap_size < 4Gb
     701 // ZeroBased - Use zero based compressed oops with encoding when
     702 //     NarrowOopHeapBaseMin + heap_size < 32Gb
     703 // HeapBased - Use compressed oops with heap base + encoding.
     704
     705 // 4Gb
     706 static const uint64_t UnscaledOopHeapMax = (uint64_t(max_juint) + 1);

src/share/vm/memory/universe.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File