704 // Set MetaspaceSize, MinMetaspaceExpansion and MaxMetaspaceExpansion
705 if (MetaspaceSize > MaxMetaspaceSize) {
706 MetaspaceSize = MaxMetaspaceSize;
707 }
708
709 MetaspaceSize = align_down_bounded(MetaspaceSize, commit_alignment());
710
711 assert(MetaspaceSize <= MaxMetaspaceSize, "MetaspaceSize should be limited by MaxMetaspaceSize");
712
713 MinMetaspaceExpansion = align_down_bounded(MinMetaspaceExpansion, commit_alignment());
714 MaxMetaspaceExpansion = align_down_bounded(MaxMetaspaceExpansion, commit_alignment());
715
716 }
717
718 void Metaspace::global_initialize() {
719 MetaspaceGC::initialize(); // <- since we do not prealloc init chunks anymore is this still needed?
720
721 metaspace::ChunkHeaderPool::initialize();
722
723 if (CDSConfig::is_dumping_static_archive()) {
724 MetaspaceShared::initialize_for_static_dump();
725 }
726
727 // If UseCompressedClassPointers=1, we have two cases:
728 // a) if CDS is active (runtime, Xshare=on), it will create the class space
729 // for us, initialize it and set up CompressedKlassPointers encoding.
730 // Class space will be reserved above the mapped archives.
731 // b) if CDS either deactivated (Xshare=off) or a static dump is to be done (Xshare:dump),
732 // we will create the class space on our own. It will be placed above the java heap,
733 // since we assume it has been placed in low
734 // address regions. We may rethink this (see JDK-8244943). Failing that,
735 // it will be placed anywhere.
736
737 #if INCLUDE_CDS
738 // case (a)
739 if (CDSConfig::is_using_archive()) {
740 if (!FLAG_IS_DEFAULT(CompressedClassSpaceBaseAddress)) {
741 log_warning(metaspace)("CDS active - ignoring CompressedClassSpaceBaseAddress.");
742 }
743 MetaspaceShared::initialize_runtime_shared_and_meta_spaces();
|
704 // Set MetaspaceSize, MinMetaspaceExpansion and MaxMetaspaceExpansion
705 if (MetaspaceSize > MaxMetaspaceSize) {
706 MetaspaceSize = MaxMetaspaceSize;
707 }
708
709 MetaspaceSize = align_down_bounded(MetaspaceSize, commit_alignment());
710
711 assert(MetaspaceSize <= MaxMetaspaceSize, "MetaspaceSize should be limited by MaxMetaspaceSize");
712
713 MinMetaspaceExpansion = align_down_bounded(MinMetaspaceExpansion, commit_alignment());
714 MaxMetaspaceExpansion = align_down_bounded(MaxMetaspaceExpansion, commit_alignment());
715
716 }
717
718 void Metaspace::global_initialize() {
719 MetaspaceGC::initialize(); // <- since we do not prealloc init chunks anymore is this still needed?
720
721 metaspace::ChunkHeaderPool::initialize();
722
723 if (CDSConfig::is_dumping_static_archive()) {
724 if (!CDSConfig::is_dumping_final_static_archive()) {
725 assert(!CDSConfig::is_using_archive(), "sanity");
726 }
727 MetaspaceShared::initialize_for_static_dump();
728 }
729
730 // If UseCompressedClassPointers=1, we have two cases:
731 // a) if CDS is active (runtime, Xshare=on), it will create the class space
732 // for us, initialize it and set up CompressedKlassPointers encoding.
733 // Class space will be reserved above the mapped archives.
734 // b) if CDS either deactivated (Xshare=off) or a static dump is to be done (Xshare:dump),
735 // we will create the class space on our own. It will be placed above the java heap,
736 // since we assume it has been placed in low
737 // address regions. We may rethink this (see JDK-8244943). Failing that,
738 // it will be placed anywhere.
739
740 #if INCLUDE_CDS
741 // case (a)
742 if (CDSConfig::is_using_archive()) {
743 if (!FLAG_IS_DEFAULT(CompressedClassSpaceBaseAddress)) {
744 log_warning(metaspace)("CDS active - ignoring CompressedClassSpaceBaseAddress.");
745 }
746 MetaspaceShared::initialize_runtime_shared_and_meta_spaces();
|