Revision: 18174
          http://sourceforge.net/p/gate/code/18174
Author:   johann_p
Date:     2014-07-10 10:07:15 +0000 (Thu, 10 Jul 2014)
Log Message:
-----------
Make an effort to collect garbage before reportign memory sizes.

Modified Paths:
--------------
    gcp/trunk/src/gate/cloud/batch/BatchRunner.java

Modified: gcp/trunk/src/gate/cloud/batch/BatchRunner.java
===================================================================
--- gcp/trunk/src/gate/cloud/batch/BatchRunner.java     2014-07-10 01:19:48 UTC 
(rev 18173)
+++ gcp/trunk/src/gate/cloud/batch/BatchRunner.java     2014-07-10 10:07:15 UTC 
(rev 18174)
@@ -152,6 +152,7 @@
         processor.setResultQueue(resultQueue);
         processor.init();
         log.info("Duplication finished");
+        System.gc();
         log.info("Total allocated memory: "+(runtime.totalMemory()/MB)+"M");
         log.info("Used memory: 
"+((runtime.totalMemory()-runtime.freeMemory())/MB)+"M");
         duplicationFinishedTime = System.currentTimeMillis();
@@ -413,6 +414,7 @@
     }
     long processingFinishedTime = System.currentTimeMillis();
     log.info("Processing finished");
+    System.gc();
     log.info("Total allocated memory: "+(runtime.totalMemory()/MB)+"M");
     log.info("Used memory: 
"+((runtime.totalMemory()-runtime.freeMemory())/MB)+"M");
     // if we did not need to process anything then the duplicationFinishedTime 
will not have
@@ -663,6 +665,8 @@
       }
     });
 
+    System.gc();
+    log.info("Processors available: "+runtime.availableProcessors());
     log.info("Initial total allocated memory: 
"+(runtime.totalMemory()/MB)+"M");
     log.info("Initial used memory: 
"+((runtime.totalMemory()-runtime.freeMemory())/MB)+"M");
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to