]> source.dussan.org Git - poi.git/commitdiff
Print out amount of available memory during startup of OOXMLLite
authorDominik Stadler <centic@apache.org>
Sun, 11 Dec 2016 20:58:03 +0000 (20:58 +0000)
committerDominik Stadler <centic@apache.org>
Sun, 11 Dec 2016 20:58:03 +0000 (20:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1773633 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/util/OOXMLLite.java

index d537a9d3a67eebd131a51bc2c47f075e62911135..4e459c1f2d84462e243d38293b1b8dce446c60b4 100644 (file)
@@ -76,6 +76,13 @@ public final class OOXMLLite {
     }
 
     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;