Search code examples
javajvmpermgen

Where is permgen located in JDK 7 JVM?


I'm studying about JDK 7 JVM's Runtime Data Areas.

I want to compare JDK 7 JVM and JDK 8 JVM. There are some memory areas in JDK 7 JVM, but I'm confused.

I'm looking for JDK 7 JVM Runtime Data Areas Architecture picture and articles in blogs, but all of articles saying different.

  1. Heap (including Young Generation, Old Generation)
  2. Method Area (where is located in JVM? heap? non-heap? native memory? or independent?)
  3. Runtime Constant Pool in Method Area
  4. JVM Stack in Native Memory
  5. Native Method Stack in Native Memory
  6. PC Register in Native Memory

But I'm confused about PermGen's location in Runtime Data Areas.

someone telling PermGen is part of Method Area.

someone telling Method Area is part of PermGen.

someone telling PermGen is non-heap. (then PermGen is located in Native Memory? then Runtime Data Areas separated 3 parts? (Heap, non-Heap(Method Area), Native Memory))

someone's picture telling PermGen is part of Heap enter image description here

What is correct?


Solution

  • If you differentiate simply between Heap and Native memory PermGen is part of the Heap area. So is the method area.

    The image you've attached is basically right in this regard.

    Hotspot VM Heap areas

    In the Hotspot-VM Permanent Generation (PermGen) is/was one of the Heap areas.

    It is, however, a special heap space separated from the main memory heap. It is not affected by Java options like -Xmx or -Xms and has it's own limits and garbage collection behavior. Therefore one could also say it is non-heap depending on the viewpoint and context.