Heaptrack
Linux heap profiler that records allocation traces, finds leaks, and compares memory use across runs.
- CCM score
- 58 of 100
- skills.sh installs
- 779
- GitHub stars
- 303
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers recording with
heaptrackand analysis withheaptrack_printor the GUI, including attaching to running processes via--pid - Includes filters such as
-p,-l,-s,--min-cost, and flamegraph output with-ffor hotspot and leak reports - Explains metrics like peak heap, temporary allocations, and total leaked memory, plus a comparison against Valgrind massif
- Designed for C++ and Rust programs on Linux that need lower overhead (about 2-3x) than massif (about 20x)
Install
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill heaptrack -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
heaptrack
Purpose
Guide agents through heaptrack for heap allocation profiling on Linux: recording allocation traces, analysing with heaptrack_print, identifying leaks and hotspots, and comparing runs.
Triggers
- "How do I find memory allocation hotspots in my C++ program?"
- "My program uses too much memory — how do I find where?"
- "How do I use heaptrack to detect memory leaks?"
- "What is heaptrack and how does it differ from Valgrind massif?"
- "How do I compare memory usage between two program versions?"
- "heaptrack_print output — how do I interpret it?"
Workflow
1. Installation
# Ubuntu/Debian
sudo apt-get install heaptrack heaptrack-gui
# Fedora
sudo dnf install heaptrack
# Arch
sudo pacman -S heaptrack
# Build from source
git clone https://github.com/KDE/heaptrack.git
cmake -S heaptrack -B heaptrack-build -DCMAKE_BUILD_TYPE=Release
cmake --build heaptrack-build -j$(nproc)
2. Basic usage
# Profile a program (generates heaptrack.<prog>.<pid>.zst)
heaptrack ./myapp arg1 arg2
# Attach to running process
heaptrack --pid 12345
# Analyse the trace file
heaptrack_print heaptrack.myapp.12345.zst
Details
- Repository
- github.com/mohitmishra786/low-level-dev-skills
- Categories
- Debugging, CLI & Terminal, Rust
- First seen
- Jun 3, 2026
Questions
What does the heaptrack skill help an agent do?
The heaptrack skill guides an agent through heap allocation profiling on Linux, covering recording allocation traces, analyzing them with heaptrack_print, finding memory leaks and allocation hotspots, and comparing runs. It also helps interpret heaptrack_print output such as peak heap consumption and total memory leaked.
How do I install the heaptrack skill?
Run npx -y skills add mohitmishra786/low-level-dev-skills --skill heaptrack -y in your project. Once installed, the agent can walk you through profiling programs with heaptrack and reading the resulting trace files.
Where does the heaptrack skill rank in the Debugging category?
The heaptrack skill is listed in the Debugging category on Claude Marketplaces, alongside diagnosing-bugs, azure-messaging, safe-debug, systematic-debugging and sentry-cli. It focuses specifically on memory allocation profiling rather than general bug diagnosis.
How does heaptrack compare to Valgrind massif according to this skill?
The skill notes that heaptrack has lower overhead, roughly 2-3x compared with about 20x for massif, and that it does not need recompilation. Massif remains the better choice when you need platform portability to macOS or detailed snapshot comparison.
Does the heaptrack skill work with Rust programs?
Yes, the skill covers using heaptrack with Rust binaries when the system allocator is used, so heaptrack can intercept allocations. It also recommends building with debug symbols for more readable backtraces.
More from mohitmishra786/low-level-dev-skills
All 54- Ninja778
- Freertos774
- Linux Kernel Modules772
- Msvc Cl772
- Ebpf765
- Fuzzing761
- Binutils759
- Linkers Lto753
- Conan Vcpkg747
- Rust Security744
- Dynamic Linking737
- Rust Ffi713
- Rust Sanitizers Miri713
- Rust Unsafe705
- Pgo695
- Interpreters689
- Cargo Workflows686
- Meson685
- Rust Debugging676
- Cpp Modules669
- Hardware Counters666
- Debug Optimized Builds652
- Rustc Basics649
- Cpp Templates648
Similar to Heaptrack
More DebuggingvalgrindSkillmohitmishra786/low-level-dev-skills851 installsValgrind skill for Memcheck memory error detection, plus Cachegrind, Callgrind, and Massif profiling.
rust-profilingSkillmohitmishra786/low-level-dev-skills810 installsRust profiling workflow covering flamegraphs, binary size, monomorphization bloat, and Criterion microbenchmarks.
memory-leak-detectionSkillaj-geddes/useful-ai-prompts594 installsDetects memory leaks in Node.js and Python using heap snapshots, profiling, and production monitoring.
memory-profilerPluginrohitg00/awesome-claude-code-toolkit2.9K starsMemory leak detection and heap analysis
perf-profilerSkillcomposio-community/awesome-claude-plugins2K starsEvidence-backed CPU and memory profiling that captures hotspots with file:line and flame graph artifacts.
performance-profilerSkillalirezarezvani/claude-skills794 installsProfiles slow endpoints, memory leaks, and bundle bloat in Node.js, Python, and Go, always measuring before and after.