HeapRoots 2.0.7 Documentation

Ben Hardill - 24 October 2005

Back to Contents

Overview

HeapRoots is a JavaTM 'Heap Analysis' tool. It is for debugging 'Java Application Memory Leaks' by analysing dumps taken from Java applications ('heap dumps').

See the FAQ for information on getting started.

Heap Dumps

The Java Virtual Machine (JVMTM) maintains a run-time data area (called a heap) for the allocation of all class instances and array objects. The heap storage for objects is automatically reclaimed by a storage management system known as the garbage collector. If an application requires more heap space than can be made available by the garbage collector, the JVM throws an OutOfMemoryError.

The format of heap dump that HeapRoots uses (what I will call a "Heap dump") is a textual format produced by an IBM VM contained in a IBM Developer Kit for Windows, Java Edition. This contains a list of object's which are live on the JVM garbage collected heap and various data about each object. Depending on JVM version, these dumps may be available upon "OutOfMemory" situations, triggered by user/OS signals or are created by support tools from system dumps.

For information on getting heapdumps, support, formats etc. see the Diagnostics Guide from the Links section.

Benefit

The HeapRoots tool is necessary because heapdumps are huge. Heaps contain possibly millions of objects and analysing these files directly is very difficult. HeapRoots can accept a variety of dump input methods and provides features so that the developer or service engineer can concentrate on doing the analysis and not on reading the data.

The primary use of HeapRoots is to identify memory leaks in Java applications. This is may be done, for example, by support groups within IBM or by developers who want to take a look into their application's memory usage.

Sample Heap dump line

Below is a sample line from a heap dump (format is subject to change). This shows a java/util/Vector instance using 32 bytes of heap space, with a handle of 0x10185fe0. It references one other object with a handle of 0x10185fa8. In this case the reference will turn out to be an Object[] array because the Vector class is backed by an array of objects.

0x10185fe0 [32] java/util/Vector
	0x10185fa8 

See the FAQ for information on getting started.

Top