Java Memory Concepts: Difference between revisions
Jump to navigation
Jump to search
(→Heap) |
(→Heap) |
||
Line 5: | Line 5: | ||
=Heap= | =Heap= | ||
The ''heap'' is the runtime data area in the JVM where all class instances and arrays are allocated. The heap is allocated when the JVM starts. The objects that are no longer in use are automatically reclaimed by a [[Java_Memory_Concepts#Garbage_Collector|garbage collector]]. | The ''heap'' is the runtime data area in the JVM where all class instances and arrays are allocated. The heap is allocated when the JVM starts. The objects that are no longer in use are automatically reclaimed by a [[Java_Memory_Concepts#Garbage_Collector|garbage collector]]. Metrics reflecting heap usage are exposed by the [[Memory_Monitoring_and_Managemen_Platform_MBeans#Memory_MBean|Memory MBean]], which can be obtained from the [[JMX#The_Platform_MBean_Server|platform MBean server]]. | ||
Metrics reflecting heap usage are exposed by the [[Memory_Monitoring_and_Managemen_Platform_MBeans#Memory_MBean|Memory MBean]], which can be obtained from the [[JMX#The_Platform_MBean_Server|platform MBean server]]. | |||
=Non-Heap Memory= | =Non-Heap Memory= |
Revision as of 17:48, 9 May 2017
Internal
Heap
The heap is the runtime data area in the JVM where all class instances and arrays are allocated. The heap is allocated when the JVM starts. The objects that are no longer in use are automatically reclaimed by a garbage collector. Metrics reflecting heap usage are exposed by the Memory MBean, which can be obtained from the platform MBean server.