6984368: Large default heap size does not allow to use zero based compressed oops

Take into account HeapBaseMinAddress and round down MaxPermSize

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2010-09-14 17:19:35 -07:00
parent e65f42fe5e
commit 7df5e956d1
2 changed files with 7 additions and 2 deletions

View file

@ -1273,7 +1273,8 @@ bool verify_object_alignment() {
}
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);
}