Is permanent generation part of the heap or does it lies in a different space of itself in jvm

Nav picture Nav · Dec 6, 2011 · Viewed 6.9k times · Source

I have seen multiple comments regarding this question - some say yes and some say no, and many of the answers are ambiguous. Can anyone please describe in simpler terms where it resides? In one post I even saw someone say that it shares the same memory place as class memory where classes are loaded into by classloaders - is that true?

Answer

GreenMatt picture GreenMatt · Dec 6, 2011

Original (perhaps mistaken) answer: If wikipedia is to be believed, it's part of the heap.

Edit: I've looked around at this more, including the site referenced in a comment by the OP. During this research I came across this SO question, which references this document, which indicates that for Sun Java (version 6), the permanent collection is actually outside the heap. That said, I'm no Java expert and wasn't previously aware of the memory management details at this level. If my reading is correct, the placement - or even the existence - of the permanent generation is a jvm implementation detail.