PermGen and Heap, Difference and their significance
Good links are there in What does PermGen actually stand for?. Especially liked this blog
Memory(Heap) is managed in generations, or memory pools holding objects of different ages. Garbage collection occurs in each generation when the generation fills up. Objects are allocated in a generation for younger objects or the young generation
, and because of infant mortality most objects die there.
When any new object is constructed it goes to Eden space which is a part of Young Generation
.
If object is still alive after some time it goes to tenured generation
where long lived objects lie.
If object is supposed to live until over process exist then object is moved to Perm Generation
.Java classes
are stored in the permanent generation.