Print out amount of available memory during startup of OOXMLLite

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773633 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2016-12-11 20:58:03 +00:00
parent 1c30718f53
commit 261912044a

View File

@ -76,6 +76,13 @@ public final class OOXMLLite {
} }
public static void main(String[] args) throws IOException, ClassNotFoundException { public static void main(String[] args) throws IOException, ClassNotFoundException {
System.out.println("Free memory (bytes): " +
Runtime.getRuntime().freeMemory());
long maxMemory = Runtime.getRuntime().maxMemory();
System.out.println("Maximum memory (bytes): " +
(maxMemory == Long.MAX_VALUE ? "no limit" : maxMemory));
System.out.println("Total memory (bytes): " +
Runtime.getRuntime().totalMemory());
String dest = null, test = null, ooxml = null; String dest = null, test = null, ooxml = null;