Hi All,

        Attached is a simple patch adding some logging before and after the
        garbage collector is invoked in the MRUMemoryStore. Hopefully this can
        give us some indication as to how much has been freed, and what is
        available.

        Diff is against the cocoon_20_branch ? (is this ok, or should it
        really be against trunk ?)
        
        Cheers,

        Marcus

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : [EMAIL PROTECTED]
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:
Index: MRUMemoryStore.java
===================================================================
RCS file: 
/home/cvspublic/xml-cocoon2/src/org/apache/cocoon/components/store/MRUMemoryStore.java,v

retrieving revision 1.2.2.12
diff -u -r1.2.2.12 MRUMemoryStore.java
--- MRUMemoryStore.java 2001/08/23 12:22:23     1.2.2.12
+++ MRUMemoryStore.java 2001/08/23 19:22:59
@@ -208,8 +208,16 @@
       while (true) {
         // amount of memory used is greater then heapsize
         if (this.jvm.totalMemory() - this.jvm.freeMemory() > this.heapsize) {
+          getLogger().debug(
+           "Invoking garbage collection, total memory = " +
+           this.jvm.totalMemory() + ", free memory = " + this.jvm.freeMemory()
+         );
           this.jvm.runFinalization();
           this.jvm.gc();
+          getLogger().debug(
+           "Garbage collection complete, total memory = " +
+           this.jvm.totalMemory() + ", free memory = " + this.jvm.freeMemory()
+         );
           synchronized (this) {
             while ((this.cache.size() > 0) && (this.jvm.freeMemory() < 
this.freememory)) {
               this.free();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to