What does PermGen actually stand for?

JavaPermgen

Java Problem Overview


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... something?

Does anyone know what PermGen actually stands for?

Java Solutions


Solution 1 - Java

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.

Solution 2 - Java

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.

Solution 3 - Java

Permanent Generation. See the java GC tuning guide for more details on the garbage collector.

Solution 4 - Java

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.

Solution 5 - Java

PermGen stands for Permanent Generation.

Here is a brief blurb on DDJ

Solution 6 - Java

Solution 7 - Java

If I remember correctly, the gen stands for generation, as in a generational garbage collector (that treats younger objects differently than mid-life and "permanent" objects). Principle of locality suggests that recently created objects will be wiped out first.

Solution 8 - Java

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSCdFView Question on Stackoverflow
Solution 1 - JavaTom Hawtin - tacklineView Answer on Stackoverflow
Solution 2 - Javabajafresh4lifeView Answer on Stackoverflow
Solution 3 - JavaDustinView Answer on Stackoverflow
Solution 4 - JavaAlex K.View Answer on Stackoverflow
Solution 5 - JavaMichael EasterView Answer on Stackoverflow
Solution 6 - JavaRob KennedyView Answer on Stackoverflow
Solution 7 - JavaUriView Answer on Stackoverflow
Solution 8 - JavaSumanth VaradaView Answer on Stackoverflow