Search⌘ K
AI Features

Memory Areas

The JVM manages two primary types of memory: heap and non-heap. Heap memory stores actual object data, while non-heap includes various runtime data areas essential for executing a program. Key components of heap memory include the Eden Space, Survivor Spaces, and Old Generation, with the permanent generation (PermGen) historically holding class metadata until it was replaced by Metaspace in Java 8. Metaspace utilizes native memory, providing greater flexibility and automatic sizing compared to PermGen. Additionally, the code cache is utilized for storing JIT-compiled machine instructions, and string interning conserves memory by referencing unique string copies.

We'll cover the following...
...