In Java 6 we used to use the following GC configuration to prevent Perm Gen OutOfMemoryException
after several redeployments of our app:
-XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
We're moving to Java 7 and want to use the new G1 GC, which from what I've read, moves the classes from the PermGen in Java memory to native memory.
Is there some flag to enable unloading unused classes?