process

Heaptrack – heap memory profiler for Linux applications

Heaptrack is a heap memory profiler for Linux applications. It is intended for developers trying to understand where an application allocates memory, why its footprint grows and which code paths are responsible.

Instead of simply reporting how much RAM a process is using, Heaptrack records allocation events along with their call stacks. The resulting traces provide a more detailed picture of a program’s behaviour across its lifetime.

The recording component and analysis programs are separate, making it practical to collect data on one machine and inspect it on another.

This is free and open source software.

Key Features

  • Start an application under the profiler, or attach to a running process by its PID using GDB.
  • Identify allocations that are never released, excessive allocation calls and short-lived temporary allocations.
  • Examine aggregated allocation costs, peak memory consumers and other hotspots to prioritise optimisation work.
  • Explore an analysis GUI with a profile summary, top-down and bottom-up call trees and flame graphs.
  • View charts that show allocation costs and memory behaviour over the course of a profiling session.
  • Use heaptrack_print for terminal reports, or convert collected data into Massif and collapsed stack formats for other tools.
  • Capture raw traces on embedded targets, then interpret them on a development machine using sysroot and debug information.
  • Profile compiled programs including Rust applications with debug symbols, with optional symbol demangling support.
  • Adjust call-stack unwinding depth to balance tracing detail against the overhead of recording allocations.
  • Examine caller/callee relationships and open source locations in an editor when the corresponding file paths are available.

Website: github.com/KDE/heaptrack
Support:
Developer: KDE
License: GNU General Public License v2.0

Heaptrack

Heaptrack in action

Heaptrack is written in C++. Learn C++ with our recommended free books and free tutorials.


Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted