--- 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);
}