HeapRoots

HeapRoots is a tool for debugging memory leaks in Java™ applications through analysis of "heap dumps."

The Java virtual machine (JVM) maintains a runtime data area (known as 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.

HeapRoots analyses "heap dumps," which are files (typically text files) containing information about the objects in the JVM garbage collected heap.

Some IBM® VMs (contained in the IBM Developer Kits for Windows, Java Edition) can produce heap dumps on demand; heap dumps can also be triggered by out-of-memory situations.

HeapRoots loads these heap dump files and provides commands for analyzing the data. These commands run algorithms on the data or query for information about the data. HeapRoots provides a command-line interactive interface where one enters commands and gets results. The following list shows examples of analysis:
  • Searching or filtering of individual objects
  • Summary or tabulation of the various types of objects
  • Statistics on heap address space (such as gaps between objects)
  • Inward and outward references of an object
  • Paths between two objects
  • Exploring the heap from source or root objects by following references
  • Calculation of objects reachable by an object
  • Calculation of objects kept alive by an object.