8048088: Conservative maximum heap alignment should take vm_allocation_granularity into account
authortschatzl
Mon, 21 Jul 2014 09:59:54 +0200
changeset 25729 fa3a77f2977b
parent 25728 7f8a76e3baa8
child 25730 7eb4e685f739
8048088: Conservative maximum heap alignment should take vm_allocation_granularity into account Summary: Also consider os::vm_allocation_granularity in the calculation. Reviewed-by: brutisso
hotspot/src/share/vm/runtime/arguments.cpp
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Mon Jul 21 09:59:46 2014 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Mon Jul 21 09:59:54 2014 +0200
@@ -1537,8 +1537,10 @@
     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() {