< prev index next >

src/hotspot/share/oops/compressedKlass.hpp

Print this page
@@ -106,11 +106,11 @@
    // We use a different narrow Klass pointer geometry depending on
    // whether we run in standard mode or in compact-object-header-mode.
  
    // Narrow klass pointer bits for an unshifted narrow Klass pointer.
    static constexpr int narrow_klass_pointer_bits_noncoh = 32;
-   static constexpr int narrow_klass_pointer_bits_coh = 22;
+   static constexpr int narrow_klass_pointer_bits_coh = 19;
  
    // Bit size of a narrowKlass
    static int _narrow_klass_pointer_bits;
  
    // The maximum shift values we can use depending on UseCompactObjectHeaders

@@ -188,10 +188,13 @@
    static int max_shift()                 { check_init(_max_shift); return _max_shift; }
  
    // Returns the maximum encoding range, given the current geometry (narrow klass bit size and shift)
    static size_t max_encoding_range_size() { return nth_bit(narrow_klass_pointer_bits() + max_shift()); }
  
+   // For use before pre-initialization
+   static constexpr size_t max_klass_range_size_coh = nth_bit(narrow_klass_pointer_bits_coh + max_shift_coh);
+ 
    // Returns the maximum allowed klass range size.
    static size_t max_klass_range_size();
  
    // Reserve a range of memory that is to contain Klass strucutures which are referenced by narrow Klass IDs.
    // If optimize_for_zero_base is true, the implementation will attempt to reserve optimized for zero-based encoding.
< prev index next >