Java Heap and Perm Space Java Heap space is used by java runtime to allocate memory to Objects and JRE classes. Java memory is separated into two different regions. These regions are called Heap space and Permgen (for Permanent Generation) For the HotSpot Java VM, the memory pools for serial garbage collection are the following. Eden Space (heap): The pool from which memory is initially allocated for most objects. Survivor Space (heap): The pool containing objects that have survived the garbage collection of the Eden space. Tenured Generation (heap): The pool containing objects that have existed for some time in the survivor space. Code Cache (non-heap): The HotSpot Java VM also includes a code cache, containing memory that is used for compilation and storage of native code. Permanent generation has been completely removed in JDK 8. JDK8: Metaspace In JDK 8, classes metadata is now stored in the native heap and this space is called Metaspace. There are som...
Comments
Post a Comment