I know that the JVM has some JVM HotSpot memory which is further divided into three areas:Java HeapPermanent Generation SpaceNative Heap (C-Heap)I know that Java has automatic garbage collection mechanism for Heap Memory.So, I want to confirm that in my last statement Heap refers to both Java Heap and Native Heap (C-Heap) or just Java Heap.Also, what about Permanent Generation Space? Is it also considered as some kind of Heap or what?
Does the JVM's Garbage Collector clean the entire JVM HotSpot memory (C-Heap, Java Heap and Permanent Generation space) or just Java Heap?
java;garbage collection;jvm;heap
The GC will collect both the Java Heap and the permgen, but not the native heap. The native heap is manually managed by whatever C code owns it. The permgen, on the other hand, is managed by the JVM garbage collector (though not necessarily as efficiently as the rest of the heap, as certain GC algorithms will only compact the permgen when absolutely necessary).