< prev index next >

src/hotspot/share/memory/metaspace.cpp

Print this page

        

*** 933,943 **** ChunkManager* Metaspace::_chunk_manager_class = NULL; #define VIRTUALSPACEMULTIPLIER 2 #ifdef _LP64 ! static const uint64_t UnscaledClassSpaceMax = (uint64_t(max_juint) + 1); void Metaspace::set_narrow_klass_base_and_shift(address metaspace_base, address cds_base) { assert(!DumpSharedSpaces, "narrow_klass is set by MetaspaceShared class."); // Figure out the narrow_klass_base and the narrow_klass_shift. The // narrow_klass_base is the lower of the metaspace base and the cds base --- 933,943 ---- ChunkManager* Metaspace::_chunk_manager_class = NULL; #define VIRTUALSPACEMULTIPLIER 2 #ifdef _LP64 ! static uint64_t UnscaledClassSpaceMax = (uint64_t(max_juint) + 1); void Metaspace::set_narrow_klass_base_and_shift(address metaspace_base, address cds_base) { assert(!DumpSharedSpaces, "narrow_klass is set by MetaspaceShared class."); // Figure out the narrow_klass_base and the narrow_klass_shift. The // narrow_klass_base is the lower of the metaspace base and the cds base
*** 954,964 **** #endif { higher_address = metaspace_base + compressed_class_space_size(); lower_base = metaspace_base; ! uint64_t klass_encoding_max = UnscaledClassSpaceMax << LogKlassAlignmentInBytes; // If compressed class space fits in lower 32G, we don't need a base. if (higher_address <= (address)klass_encoding_max) { lower_base = 0; // Effectively lower base is zero. } } --- 954,965 ---- #endif { higher_address = metaspace_base + compressed_class_space_size(); lower_base = metaspace_base; ! // Using oopDesc::_metadata high bits so LogKlassAlignmentInBytes shift is no longer possible ! uint64_t klass_encoding_max = UnscaledClassSpaceMax; // If compressed class space fits in lower 32G, we don't need a base. if (higher_address <= (address)klass_encoding_max) { lower_base = 0; // Effectively lower base is zero. } }
*** 1206,1216 **** set_compressed_class_space_size(CompressedClassSpaceSize); } void Metaspace::global_initialize() { MetaspaceGC::initialize(); ! #if INCLUDE_CDS if (DumpSharedSpaces) { MetaspaceShared::initialize_dumptime_shared_and_meta_spaces(); } else if (UseSharedSpaces) { // If any of the archived space fails to map, UseSharedSpaces --- 1207,1221 ---- set_compressed_class_space_size(CompressedClassSpaceSize); } void Metaspace::global_initialize() { MetaspaceGC::initialize(); ! #ifdef _LP64 ! if (EnableValhalla) { ! UnscaledClassSpaceMax >>= oopDesc::storage_props_nof_bits; ! } ! #endif #if INCLUDE_CDS if (DumpSharedSpaces) { MetaspaceShared::initialize_dumptime_shared_and_meta_spaces(); } else if (UseSharedSpaces) { // If any of the archived space fails to map, UseSharedSpaces
< prev index next >