Hello! now I use the jconsole to monitor the tomcat and the web applications running on it! However, I found that the number of the total loaded classes is growing linearly and actually it is because the number of the unloaded classes is increasing. The number of the current loaded classes remains the same. I also use the command " jstat -class pid" and it shows the same result. Is this situation some kind of the 'memory leak' and how to solve this problem? Thanks! [ May 15, 2006: Message edited by: Bear Bibeault ]
Hello! Thanks for the reply! I monitored my heap size which is almost around 15 Mb and I used the default setting for the heap size allocation (64 mb). Does that mean that the GC wont run? Thank you very much!
Java's garbage collection is designed not to run until it absolutely needs to. This is a good thing because gc is a very expensive operation.
Try running your app over time or try creating a test that will create and destroy lots of objects and run it until your heap space gets close to the amount allocated. Once GC runs, you should see a drop in the number of objects hanging around.
Joined: May 15, 2006
ok! I will try to do some test to see what the GC is doing! Thank you very much for the answer! I am appreicating your help!