Eclipse Memory Analyzer


Diffusion 5.9

Diffusion 6.0

Diffusion 6.1

Diffusion 6.2

Diffusion 6.3

Diffusion Cloud


What is Eclipse Memory Analyzer?

Diffusion can generate heap dumps which can be imported into an Eclipse plugin called Eclipse Memory Analyzer (MAT). This is useful under some circumstances when an out of memory errors occurs.

Creating a heap dump

By default Diffusion creates a heap dump when it runs out of memory which is achieved by the following line in the startup script: -XX:+HeapDumpOnOutOfMemoryError When an out of memory error occurs a .hprof file will be generated which contains the heap dump. The location of the generated .hprof file is defined in the startup script and is set to place the file in the Diffusion logs directory by default: -XX:HeapDumpPath=${DIFFUSION_HOME}/logs

Installing the plugin

In eclipse navigate to Help -> Install New Software and select the appropriate update site for your release of Eclipse. Eclipse Memory Analyser There are two plugins to install but the exact locations of the plugins may vary with your version of Eclipse. The names of the plugins are:

  • Memory Analyzer
  • Memory Analyzer (Charts) [optional]

In Eclipse MARS these can be found under Performance, Profiling and Tracing Tools.

Reading a heap dump

Opening a .hprof file in Eclipse will load it into the Memory Analyzer plugin. Select “Leak Suspect Report” and click Finish to see an analysis of the heap dump. Eclipse Memory Analyser A pie chart is displayed that that shows the leak suspects and information about each suspect appears underneath. If you click the overview tab at the top you will be presented with details and further actions that you can take.

MAT Overview

More Information

More information is available in the Memory Analyzer Wiki.