X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FMemorySetting.java;h=561fea58116afd92be2da9cf09caadf82bf6e8d9;hp=ac1ac28067870be8e0d6a7a8ba76d5dd6f07ef53;hb=205ff41c5d14efc1e79f362aee27ca40fbc801bd;hpb=5911188c77dae6665babf4041dc11484f4a09a0b diff --git a/src/jalview/bin/MemorySetting.java b/src/jalview/bin/MemorySetting.java index ac1ac28..561fea5 100644 --- a/src/jalview/bin/MemorySetting.java +++ b/src/jalview/bin/MemorySetting.java @@ -16,6 +16,8 @@ public class MemorySetting public final static String maxHeapSizeProperty = "jvmmemmax"; + protected static boolean logToClassChecked = false; + public static long getMemorySetting() { return getMemorySetting(null, null); @@ -71,7 +73,8 @@ public class MemorySetting } catch (NumberFormatException e) { memmax = maxHeapSizeDefault; - System.out.println("MemorySetting Property '" + maxHeapSizeProperty + System.out.println("MemorySetting Property '" + + maxHeapSizeProperty + "' (" + jvmmemmaxorig + "') badly formatted, using default (" + memmax + ")."); @@ -105,7 +108,8 @@ public class MemorySetting else { // no need to warn if no setting - // System.out.println("MemorySetting Property '" + maxHeapSizeProperty + "' not + // System.out.println("MemorySetting Property '" + maxHeapSizeProperty + // + "' not // set."); } @@ -144,7 +148,7 @@ public class MemorySetting boolean memoryPercentError = false; try { - pcmem = MemoryPercent.memPercent(percent); + pcmem = MemoryPercent.memPercentAmount(percent); } catch (Throwable t) { memoryPercentError = true; @@ -153,7 +157,7 @@ public class MemorySetting + "). 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) {