
- All the static variables and general metadata lives in Metaspace area.
- All the objects on the Heap that are referenced by the static variables in Metaspace will never be garbage collected.
- Because the static variable is never gone.
- Before Java 7, it was called as the
PermGen.- Sometimes when the PermGen got full, it returned
java.lang.OutOfMemoryError: PermGen, which was able to be resolved by setting-XX:PermSize=Nand-XX:MaxPermSize=N. - However after Java 8, these flags are no longer valid as PermGen is replaced by Metaspace.
- Sometimes when the PermGen got full, it returned

Leave a comment