---
name: "heaptrack"
section: "1"
platform: "linux"
package: "heaptrack"
version: "1.5.0+dfsg1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/heaptrack"
---

# heaptrack(1)

heap memory profiler for linux, command line utility

## NAME

heaptrack - heap memory profiler for linux, command line utility

## SYNOPSIS

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

## DESCRIPTION

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:

- DEBUGGEE

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

### Alternatively, to attach to a running process:

- **-p**, **--pid** PID

  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:

- **-d**, **--debug**

  Run the debuggee in GDB and heaptrack.

- ARGUMENT

  Any number of arguments that will be passed verbatim to the debuggee.

- **-h**, **--help**

  Show this help message and exit.

- **-v**, **--version**

  Displays version information.

## SEE ALSO

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.
