by Matthias Ernst <matthias.ernst@[EMAIL PROTECTED]
>
Aug 19, 2006 at 10:50 AM
Hi GNS,
> I have a java web application running on Sun Solaris 10 platform, the
> java version is 1.5.0. Recently I found when I used TOP command to get
> the memory used by my application it was over 1.5GB and kept
> increasing. However when using the java.lang.Runtime.totalMemory() and
> freeMemory() methods from my code the memory usage was way lower than
> the size re****ted by TOP.
By any chance, are you using File.deleteOnExit()? The method "leaks"
memory
in native space outside the java heap - deleting such a file yourself does
not free that registration. Very hard to diagnose.
See
http://www.bobcongdon.net/blog/2005/07/filedeleteonexit-is-evil.html
or
http://blogs.sun.com/roller/page/chegar?entry=diagnosing_deleteonexit_issues
Matthias