private final static long maxHeapSizeDefault = 34359738368L; // 32GB
+ private final static long noMemMaxHeapSizeDefault = 8589934592L; // 8GB
+
public final static String maxHeapSizeProperty = "jvmmemmax";
public static long getMemorySetting()
}
// In the case of an error reading the percentage if physical memory, let's cap maxMemLong to 8GB
if (memoryPercentError && jvmmempc != null && pcmem == -1
- && memmax > 8589934592L)
+ && memmax > noMemMaxHeapSizeDefault)
{
System.out.println(
"Capping maximum memory to 8GB due to failure to read physical memory size.");
- memmax = 8589934592L;
+ memmax = noMemMaxHeapSizeDefault;
}
if (pcmem == -1) // not set