public final static String maxHeapSizeProperty = "jvmmemmax";
+ protected static boolean logToClassChecked = false;
+
public static long getMemorySetting()
{
return getMemorySetting(null, null);
} catch (NumberFormatException e)
{
memmax = maxHeapSizeDefault;
- System.out.println("MemorySetting Property '" + maxHeapSizeProperty
+ System.out.println("MemorySetting Property '"
+ + maxHeapSizeProperty
+ "' ("
+ jvmmemmaxorig + "') badly formatted, using default ("
+ memmax + ").");
else
{
// no need to warn if no setting
- // System.out.println("MemorySetting Property '" + maxHeapSizeProperty + "' not
+ // System.out.println("MemorySetting Property '" + maxHeapSizeProperty
+ // + "' not
// set.");
}
boolean memoryPercentError = false;
try
{
- pcmem = MemoryPercent.memPercent(percent);
+ pcmem = MemoryPercent.memPercentAmount(percent);
} catch (Throwable t)
{
memoryPercentError = true;
+ "). Likely to be problem with com.sun.management.OperatingSystemMXBean");
t.printStackTrace();
}
- // In the case of an error reading the percentage if physical memory, let's cap maxMemLong to 8GB
+ // In the case of an error reading the percentage of physical memory (when jvmmempc was set), let's cap maxMemLong to 8GB
if (memoryPercentError && jvmmempc != null && pcmem == -1
&& memmax > noMemMaxHeapSizeDefault)
{