>>>>> "TB" == Travis Bemann 
><[EMAIL PROTECTED]> writes:

    TB> One possible memory leak is the protected/private memory leak,
    TB> which is a major problem in Java that is somewhat equivalent
    TB> to the classical memory leak in languages such as C and C++.

Travis,

I'm not sure I understand the problem you're explaining (although it
sounds completely plausible). Could you maybe post a code sample that
illustrates this memory overuse? (Scott seems determined not to call
it a "leak", which I guess it isn't technically.)

A couple of places I would look at for memory probs, just off the top
of my noggin:

        1) The StandardDataStore* uses a hash and an array for storing
           the same DSItems. This kind of rings some bells about
           circular refs and whatnot, and it -seems- like 

        2) The thread pools.** Creating new threads -does- eat memory,
           and having a ton of them around might be a problem. I've
           noticed that if I reduce the maximumConnectThreads
           parameter for my node to 10-15 from the default 50, memory
           usage stays in the 10-20Mb range rather than up around the
           60s and 70s. This might be illusory, but it could be a good
           place to investigate.

As far as profiling is concerned: obviously, if you're using the Sun
JDK, you can use the built-in profiler (try java -Xhprof for
usage). There's also a nice profile output analyzer called HAT
available from Sun, just for heap analysis. Here the URL:

        http://java.sun.com/people/billf/heap/

I did some investigation of this stuff and I didn't see anything that
was glaringly out of whack, but I'm not really a performance tuner.

Good luck to whoever takes this on... I'm putting my money on Travis. B-)

~Mr. Bad

*...which, btw, is a lovely piece of code and HATS OFF to Oskar and
 Ian et. al. for doing. Beaujolais!

**Also great stuff! Beaujolais to SGM, too!

-- 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /\____/\   Mr. Bad <[EMAIL PROTECTED]>
 \      /   Pigdog Journal | http://pigdog.org/ | *Stay*Real*Bad*
 |  (X \x)   
 (    ((**) "If it's not bad, don't do it.
  \  <vvv>   If it's not crazy, don't say it." - Ben Franklin
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________________
Freenet-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to