Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Machine > Re: Java VM Que...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 709 of 843
Post > Topic >>

Re: Java VM Question

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
 




 3 Posts in Topic:
Java VM Question
"GNS" <richa  2006-08-17 12:18:34 
Re: Java VM Question
"Ben_" <repl  2006-08-17 22:00:44 
Re: Java VM Question
Matthias Ernst <matthi  2006-08-19 10:50:28 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 14:34:16 CST 2008.