< prev index next >

src/hotspot/share/memory/metaspaceShared.cpp

Print this page

        

@@ -232,10 +232,13 @@
       Metaspace::allocate_metaspace_compressed_klass_ptrs(cds_end, cds_address);
       // map_heap_regions() compares the current narrow oop and klass encodings
       // with the archived ones, so it must be done after all encodings are determined.
       mapinfo->map_heap_regions();
     }
+#ifdef AARCH64
+    Universe::set_narrow_klass_range(CompressedClassSpaceSize);
+#endif
 #endif // _LP64
   } else {
     assert(!mapinfo->is_open() && !UseSharedSpaces,
            "archive file not closed or shared spaces not disabled.");
   }

@@ -298,10 +301,14 @@
   Universe::set_narrow_klass_base((address)_shared_rs.base());
   // Set narrow_klass_shift to be LogKlassAlignmentInBytes. This is consistent
   // with AOT.
   Universe::set_narrow_klass_shift(LogKlassAlignmentInBytes);
 
+#ifdef AARCH64
+  Universe::set_narrow_klass_range(cds_total);
+#endif
+
   Metaspace::initialize_class_space(tmp_class_space);
   tty->print_cr("narrow_klass_base = " PTR_FORMAT ", narrow_klass_shift = %d",
                 p2i(Universe::narrow_klass_base()), Universe::narrow_klass_shift());
 
   tty->print_cr("Allocated temporary class space: " SIZE_FORMAT " bytes at " PTR_FORMAT,
< prev index next >