jQuery in Action, 3rd edition
The moose likes Performance and the fly likes Number of classes in memory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Number of classes in memory" Watch "Number of classes in memory" New topic

Number of classes in memory

Michal Glowacki
Ranch Hand

Joined: Mar 14, 2006
Posts: 114

Beginner question, my jsf application after deploying starts loading more and more classes , from about 15000 at the beginning to about 22000. Looking at heap it goes to the same level after gc, so I guess it's not memory leak? Can it be because I use many static functions?

Please give me some hints how and where to investigate.

Rameshwar Kharat

Joined: Mar 17, 2008
Posts: 3
hope this will help you .
Michal Glowacki
Ranch Hand

Joined: Mar 14, 2006
Posts: 114
I have inserted System.gc() into function periodically invoked every 5 minutes, now I have the output like this

For me it means invoking System.gc() is bad idea - it doesn't help much comparing to gc made by JVM) and takes much time (above 1,5s).

Am I right?
I agree. Here's the link: http://aspose.com/file-tools
subject: Number of classes in memory
It's not a secret anymore!