This program won't take any memory beyond what the JVM takes at a minimum;
Originally posted by Susan Smith:
How long do you run it? From my example, I think at least you need to run it one hour to see that during Thread.sleep(), the heap size does increasing when you look at the heap charts in the "Monitor" tab.
Which OS are you using? Windows? Linux?
Does GC always do this every time?
So it needs to wait until the memory nears the limit of my application then do clean-up?
It appears you still have Java 1.3 on your machine and it is running that rather than java 1.6. Unless you really need 1.3 I would suggest removing it from your machine. If you do still need 1.3 then I suggest you alter your PATH variable so that it finds 1.6 by default.
I don't think this is related to what you are seeing because I believe VisualVM only works with Java 1.5 and 1.6, although I'm not sure what would happen if you ran it with 1.3.
The knights of nee want a shrubbery. And a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton