git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3210 removing overly complicated logging. Settling for System.out.println and...
[jalview.git]
/
src
/
jalview
/
bin
/
MemorySetting.java
diff --git
a/src/jalview/bin/MemorySetting.java
b/src/jalview/bin/MemorySetting.java
index
ac1ac28
..
561fea5
100644
(file)
--- 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";
public final static String maxHeapSizeProperty = "jvmmemmax";
+ protected static boolean logToClassChecked = false;
+
public static long getMemorySetting()
{
return getMemorySetting(null, null);
public static long getMemorySetting()
{
return getMemorySetting(null, null);
@@
-71,7
+73,8
@@
public class MemorySetting
} catch (NumberFormatException e)
{
memmax = maxHeapSizeDefault;
} catch (NumberFormatException e)
{
memmax = maxHeapSizeDefault;
- System.out.println("MemorySetting Property '" + maxHeapSizeProperty
+ System.out.println("MemorySetting Property '"
+ + maxHeapSizeProperty
+ "' ("
+ jvmmemmaxorig + "') badly formatted, using default ("
+ memmax + ").");
+ "' ("
+ jvmmemmaxorig + "') badly formatted, using default ("
+ memmax + ").");
@@
-105,7
+108,8
@@
public class MemorySetting
else
{
// no need to warn if no setting
else
{
// no need to warn if no setting
- // System.out.println("MemorySetting Property '" + maxHeapSizeProperty + "' not
+ // System.out.println("MemorySetting Property '" + maxHeapSizeProperty
+ // + "' not
// set.");
}
// set.");
}
@@
-144,7
+148,7
@@
public class MemorySetting
boolean memoryPercentError = false;
try
{
boolean memoryPercentError = false;
try
{
- pcmem = MemoryPercent.memPercent(percent);
+ pcmem = MemoryPercent.memPercentAmount(percent);
} catch (Throwable t)
{
memoryPercentError = true;
} catch (Throwable t)
{
memoryPercentError = true;
@@
-153,7
+157,7
@@
public class MemorySetting
+ "). Likely to be problem with com.sun.management.OperatingSystemMXBean");
t.printStackTrace();
}
+ "). 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)
{
if (memoryPercentError && jvmmempc != null && pcmem == -1
&& memmax > noMemMaxHeapSizeDefault)
{