SCdF
SCdF

Reputation: 59428

What does PermGen actually stand for?

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?

Upvotes: 129

Views: 178198

Answers (8)

Sumanth Varada
Sumanth Varada

Reputation: 1190

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.

Upvotes: 3

bajafresh4life
bajafresh4life

Reputation: 12883

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.

Upvotes: 61

Alex K.
Alex K.

Reputation: 3304

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.

Upvotes: 8

Dustin
Dustin

Reputation: 91040

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

Upvotes: 20

Tom Hawtin - tackline
Tom Hawtin - tackline

Reputation: 147164

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.

Upvotes: 88

Michael Easter
Michael Easter

Reputation: 24498

PermGen stands for Permanent Generation.

Here is a brief blurb on DDJ

Upvotes: 6

Uri
Uri

Reputation: 89829

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.

Upvotes: 3

Rob Kennedy
Rob Kennedy

Reputation: 163357

Permanent generation

Upvotes: 3

Related Questions