--- a/hotspot/src/share/vm/runtime/globals.hpp Mon Apr 24 09:14:09 2017 +0200
+++ b/hotspot/src/share/vm/runtime/globals.hpp Wed Jul 05 11:33:17 2017 +0200
@@ -25,11 +25,23 @@
#ifndef SHARE_VM_RUNTIME_GLOBALS_HPP
#define SHARE_VM_RUNTIME_GLOBALS_HPP
+#include "utilities/align.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
#include <float.h> // for DBL_MAX
+// The larger HeapWordSize for 64bit requires larger heaps
+// for the same application running in 64bit. See bug 4967770.
+// The minimum alignment to a heap word size is done. Other
+// parts of the memory system may require additional alignment
+// and are responsible for those alignments.
+#ifdef _LP64
+#define ScaleForWordSize(x) align_down_((x) * 13 / 10, HeapWordSize)
+#else
+#define ScaleForWordSize(x) (x)
+#endif
+
// use this for flags that are true per default in the tiered build
// but false in non-tiered builds, and vice versa
#ifdef TIERED