Friday, August 28, 2009 0 comments

Cool memory analysing tool for eclipse

Found a pretty cool tool to analyse heap dump files from within eclipse called Memory Analyzer. You can check for memory allocation and find out about your memory leaks, what processes are taking huge heap memory etc. More info can be found in the following links.


The Perm Gen Exception in JBoss

We sometimes get the PermGen runtime exception thrown from JBoss when running our app. Following in the lines of the exception i stumbled upon two very useful articles explaining the same. This can be found at;

As it states Permanent Generation space is different from the Heap space we set using th -Xms commands as Perm Gen space is used to store class objects / method objects generated using reflection. As we use Hibernate this space is definitely growing with time and as the first post above says we should set the -XX:PermSize and -XX:MaxPermSize when running our app servers in order to minimize the risk of these exceptions occurring. You can also set the -XX:+HeapDumpOnOutOfMemoryError option to tell the VM to generate a heap dump if OutOfMemoryError is thrown.