I know what PermGen is, what it\'s used for, why it fails, how to increase it etc.
What I don\'t know is what PermGen actually stands for. Permanent... Gen... someth
PermGen is used by the JVM to hold loaded classes. You can increase it using:
-XX:MaxPermSize=384m
if you're using the Sun JVM or OpenJDK.
So if you get an OutOfMemoryException: PermGen you need to either make PermGen bigger or you might be having class loader problems.
Permanent Generation. Details are of course implementation specific.
Briefly, it contains the Java objects associated with classes and interned strings. In Sun's client implementation with sharing on, classes.jsa
is memory mapped to form the initial data, with about half read-only and half copy-on-write.
Java objects that are merely old are kept in the Tenured Generation.
Permanent generation
Not really related match to the original question, but may be someone will find it useful. PermGen is indeed an area in memory where Java used to keep its classes. So, many of us have came across OOM in PermGen, if there were, for example a lot of classes.
Since Java 8, PermGen area has been replaced by MetaSpace area, which is more efficient and is unlimited by default (or more precisely - limited by amount of native memory, depending on 32 or 64 bit jvm and OS virtual memory availability) . However it is possible to tune it in some ways, by for example specifying a max limit for the area. You can find more useful information in this blog post.
Permgen stands for Permanent Generation. It is one of the JVM memory areas. It's part of Heap with fixed size by using a flag called MaxPermSize.
Why the name "PermGen" ?
This permgen was named in early days of Java. Permgen mains keeps all the meta data of loaded classes. But the problem is that once a class is loaded it'll remain in the JVM till JVM shutdown. So name permgen is opt for that. But later, dynamic loading of classes came into picture but name was not changed. But with Java 8, they have addressed that issue as well. Now permagen was renamed as MetaSpace with dynamic memory size.
PermGen stands for Permanent Generation.
Here is a brief blurb on DDJ