changeset 6490:c512f38a5139

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
author tschatzl
date Mon, 21 Jul 2014 09:59:54 +0200
parents 3bf2fc51186b
children a22acf6d7598
files src/share/vm/runtime/arguments.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Mon Jul 21 09:59:46 2014 +0200
+++ b/src/share/vm/runtime/arguments.cpp	Mon Jul 21 09:59:54 2014 +0200
@@ -1505,8 +1505,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() {