hotspot/src/share/vm/runtime/arguments.cpp
changeset 6465 514cf4924008
parent 6453 970dc585ab63
child 6466 ef740a24d777
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Tue Sep 14 14:09:24 2010 -0700
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Tue Sep 14 17:19:35 2010 -0700
@@ -1273,7 +1273,8 @@
 }
 
 inline uintx max_heap_for_compressed_oops() {
-  LP64_ONLY(return OopEncodingHeapMax - MaxPermSize - os::vm_page_size());
+  // Heap should be above HeapBaseMinAddress to get zero based compressed oops.
+  LP64_ONLY(return OopEncodingHeapMax - MaxPermSize - os::vm_page_size() - HeapBaseMinAddress);
   NOT_LP64(ShouldNotReachHere(); return 0);
 }