< prev index next >

src/hotspot/share/oops/compressedOops.cpp

Print this page
*** 47,10 ***
--- 47,14 ---
  // ZeroBased - Use zero based compressed oops with encoding when
  //     NarrowOopHeapBaseMin + heap_size < 32Gb
  // HeapBased - Use compressed oops with heap base + encoding.
  void CompressedOops::initialize(const ReservedHeapSpace& heap_space) {
  #ifdef _LP64
+  if (UseCompatibleCompressedOops) {
+     set_shift(LogMinObjAlignmentInBytes);
+     set_base((address)heap_space.compressed_oop_base());
+  } else {
    // Subtract a page because something can get allocated at heap base.
    // This also makes implicit null checking work, because the
    // memory+1 page below heap_base needs to cause a signal.
    // See needs_explicit_null_check.
    // Only set the heap base for compressed oops because it indicates

*** 63,10 ***
--- 67,11 ---
      // Did reserve heap below 32Gb. Can use base == 0;
      set_base(nullptr);
    } else {
      set_base((address)heap_space.compressed_oop_base());
    }
+  }
  
    _heap_address_range = heap_space.region();
  
    LogTarget(Debug, gc, heap, coops) lt;
    if (lt.is_enabled()) {
< prev index next >