* Daniel Cheng <j16sdiz+freenet at gmail.com> [2008-05-04 22:51:06]:

> On Sun, May 4, 2008 at 3:04 AM, Matthew Toseland
> <toad at amphibian.dyndns.org> wrote:
> >
> >
> >  >               int sleeptime = aggressiveGCModificator;
> >  >               if(sleeptime <= 0) { // We are done
> >  >                       ps.queueTimedJob(this, 120 * 250); // 30 sec
> >  >
> >  > Modified: trunk/freenet/src/freenet/node/Node.java
> >  > ===================================================================
> >  > --- trunk/freenet/src/freenet/node/Node.java  2008-05-02 10:09:13 UTC 
> > (rev
> >  19674)
> >  > +++ trunk/freenet/src/freenet/node/Node.java  2008-05-02 10:10:12 UTC 
> > (rev
> >  19675)
> >  > @@ -124,7 +124,7 @@
> >  >  /**
> >  >   * @author amphibian
> >  >   */
> >  > -public class Node implements TimeSkewDetectorCallback, GetPubkey, 
> > OOMHook {
> >  > +public class Node implements TimeSkewDetectorCallback, GetPubkey {
> >  >
> >  >       private static boolean logMINOR;
> >  >
> >  > @@ -1604,8 +1604,6 @@
> >  >                       e.printStackTrace();
> >  >                       throw new
> >  NodeInitException(NodeInitException.EXIT_COULD_NOT_START_UPDATER, "Could 
> > not
> >  create Updater: "+e);
> >  >               }
> >  > -
> >  > -             OOMHandler.addOOMHook(this);
> >  >
> >  >               Logger.normal(this, "Node constructor completed");
> >  >               System.out.println("Node constructor completed");
> >  > @@ -3306,23 +3304,4 @@
> >  >       public void setDispatcherHook(NodeDispatcherCallback cb) {
> >  >               this.dispatcher.setHook(cb);
> >  >       }
> >  > -
> >  > -     /**
> >  > -      * Free some memory
> >  > -      */
> >  > -     public void handleOOM() throws Exception {
> >  > -             if (cachedPubKeys != null) {
> >  > -                     Object value;
> >  > -                     do {
> >  > -                             value = cachedPubKeys.popKey();
> >  > -                     } while (value != null);
> >  > -             }
> >  > -             if (recentlyCompletedIDs != null) {
> >  > -                     synchronized (recentlyCompletedIDs) {
> >  > -                             // half it size
> >  > -                             while (recentlyCompletedIDs.size() > 
> > MAX_RECENTLY_COMPLETED_IDS / 2)
> >  > -                                     recentlyCompletedIDs.pop();
> >  > -                     }
> >  > -             }
> >  > -    }
> >  >  }
> >
> >  Why did you delete the pubkey cache clearing OOM hook?
> >
> >
> 
> I deleted that because I introduced that but I am not sure if this
> clearing is safe.
> IMO, the current OOMHook free too few memory. I wanted to introduce
> some more hooks, but have no idea where it is safe to be done. If you
> have any suggestions, please tell.

Get rid of unclaimed messages, limit the number of concurrent FECRunner threads.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080504/871a22b9/attachment.pgp>

Reply via email to