Does Garbage collection occur in permanent generation space in JVM?

Technology CommunityCategory: JavaDoes Garbage collection occur in permanent generation space in JVM?
VietMX Staff asked 3 years ago

Garbage Collection does occur in PermGen space and if PermGen space is full or cross a threshold, it can trigger a full garbage collection. If you look carefully at the output of the garbage collector, you will find that PermGen space is also garbage collected. This is the reason why correct sizing of PermGen space is important to avoid frequent full garbage collections.