| Free tutorials for Java, Eclipse and Web programming |
Version 0.3
Copyright © 2009 Lars Vogel
05.10.2009
| Revision History | ||
|---|---|---|
| Revision 0.1 | 01.10.2009 | Lars Vogel |
| Created | ||
| Revision 0.2 | 02.10.2009 | Lars Vogel |
| Example project | ||
| Revision 0.3 | 05.10.2009 | Lars Vogel |
| sub-chapters for example | ||
Table of Contents
The Java Garbage Collector releases Java objects from memory as long as no other object refers to this object.
A Java heap dump is an image of the complete Java object graph at a certain point in time. It includes all objects, Fields, Primitive types and object references.
It is possible to instruct the JVM to create automatically a heap dump in case of a OutOfMemoryError.
The Eclipse MAT helps to visualize based on Java heap dumps the references to objects and provides tools to identify potential memory leaks.
To tell the JVM to create a heapdump in case of an OutOfMemoryError use the option -XX:+HeapDumpOnOutOfMemoryError