-2

Was PermGen Space in Java 6 not a part of Heap Memory? I got this question while reading about PermGen space allocation in java 7. As per Java 7 it says its a part of heap memory, this means that there is no fixed size limitation. So method area(PermGen) is logically a part of heap. That brings me to notice, that method area was not a part of heap before java 7.

If not then how the PermGen was allocated in java 6 and under which memory?

trincot
  • 317,000
  • 35
  • 244
  • 286
vijayraj34
  • 2,135
  • 26
  • 27
  • PermGen space is removed in java 8 so I think till java 7 its part of Heap memory ! – Darshit Mar 06 '17 at 11:48
  • What about java 6? – vijayraj34 Mar 06 '17 at 11:51
  • That’s an irrelevant consideration—unless you use it draw wrong conclusions from it. Whether someone calls it part of the heap or not, has no actual technical consequences. The PermGen space is fixed size. Point. – Holger Mar 06 '17 at 16:19

2 Answers2

1

In common, the entire memory allocated to JVM is called heap memory by Java developers as heap is the dominating JVM memory. But heap memory is a separate group in JVM memory. It has new space and old space. Non-heap is another group in JVM that uses PermGem (Permanent Generation) memory to store class metadata and string constants.

PermGen memory was never part of heap memory. It is part of non-heap memory. But in Java 8, permanent memory is replaced with metaspace in order to support some performance improvements.

Nirmal
  • 89
  • 6
  • Thank you for your valuable answer, this some what clears my confusion and thanks a bunch for making and sharing JVM Tuning and understanding course. – vijayraj34 Mar 13 '17 at 08:36
0

According to this document, the permgen space is outside of the heap. But that´s for oracle jvm, so I believe it depends on the jvm you're using.