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?
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?
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.
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. See the java GC tuning guide for more details on the garbage collector.
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.
Here is a brief blurb on DDJ
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.
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.
© 2022 - 2024 — McMap. All rights reserved.