The Java Memory Allocation is divided into following sections :
- Heap – stores objects and arrays. It is shared by all threads. The Garbage Collector cleans up objects that are no longer needed.
- Stack – stores method calls, local variables and references. Each thread has its own stack.
- Code – contains the instructions that the JVM executes.
- Static – contains class-level data, such as static variables, which belong to the class rather than to a specific object.
Комментариев нет:
Отправить комментарий