提交 a7b26564 编写于 作者: K kvn

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

Summary: take into account HeapBaseMinAddress and round down MaxPermSize
Reviewed-by: never
上级 86548bbe
...@@ -32,7 +32,11 @@ void CollectorPolicy::initialize_flags() { ...@@ -32,7 +32,11 @@ void CollectorPolicy::initialize_flags() {
MaxPermSize = PermSize; MaxPermSize = PermSize;
} }
PermSize = MAX2(min_alignment(), align_size_down_(PermSize, min_alignment())); PermSize = MAX2(min_alignment(), align_size_down_(PermSize, min_alignment()));
MaxPermSize = align_size_up(MaxPermSize, max_alignment()); // Don't increase Perm size limit above specified.
MaxPermSize = align_size_down(MaxPermSize, max_alignment());
if (PermSize > MaxPermSize) {
PermSize = MaxPermSize;
}
MinPermHeapExpansion = MAX2(min_alignment(), align_size_down_(MinPermHeapExpansion, min_alignment())); MinPermHeapExpansion = MAX2(min_alignment(), align_size_down_(MinPermHeapExpansion, min_alignment()));
MaxPermHeapExpansion = MAX2(min_alignment(), align_size_down_(MaxPermHeapExpansion, min_alignment())); MaxPermHeapExpansion = MAX2(min_alignment(), align_size_down_(MaxPermHeapExpansion, min_alignment()));
......
...@@ -1273,7 +1273,8 @@ bool verify_object_alignment() { ...@@ -1273,7 +1273,8 @@ bool verify_object_alignment() {
} }
inline uintx max_heap_for_compressed_oops() { 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); NOT_LP64(ShouldNotReachHere(); return 0);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册