Scroll to navigation



heaptrack - heap memory profiler for linux, command line utility


heaptrack [--debug|-d] DEBUGGEE [ARGUMENT]...
heaptrack [--debug|-d] -p PID


A heap memory usage profiler. It uses LD_PRELOAD to track all calls to the core memory allocation functions and logs these occurrances. Additionally, backtraces are obtained and logged. Combined this can give interesting answers to questions such as:

* How much heap memory is my application using? * Where is heap memory being allocated, and how often? * How much space are heap individual allocations requesting?

To evaluate the generated heaptrack data, use heaptrack_print or heaptrack_gui.

Mandatory arguments to heaptrack:

The name or path to the application that should be run with heaptrack analyzation enabled.

Alternatively, to attach to a running process:

The process ID of a running process into which heaptrack will be injected. This only works with applications that already link against libdl.

Optional arguments to heaptrack:

Run the debuggee in GDB and heaptrack.
Any number of arguments that will be passed verbatim to the debuggee.
Show this help message and exit.
Displays version information.


The full documentation for heaptrack is maintained as a Texinfo manual. If the info and heaptrack programs are properly installed at your site, the command

info heaptrack

should give you access to the complete manual.

March 2017 heaptrack 1.0.0