8048088: Conservative maximum heap alignment should take vm_allocation_granularity into account

Also consider os::vm_allocation_granularity in the calculation.

Reviewed-by: brutisso
This commit is contained in:
Thomas Schatzl 2014-07-21 09:59:54 +02:00
parent 2e37a94622
commit ce1a131e47

View File

@ -1537,8 +1537,10 @@ void Arguments::set_conservative_max_heap_alignment() {
heap_alignment = G1CollectedHeap::conservative_max_heap_alignment();
}
#endif // INCLUDE_ALL_GCS
_conservative_max_heap_alignment = MAX3(heap_alignment, os::max_page_size(),
CollectorPolicy::compute_heap_alignment());
_conservative_max_heap_alignment = MAX4(heap_alignment,
(size_t)os::vm_allocation_granularity(),
os::max_page_size(),
CollectorPolicy::compute_heap_alignment());
}
void Arguments::set_ergonomics_flags() {