Real-time Rust heap memory visualization directly in VS Code.
Ferroalloc shows live heap memory stats inside VS Code as your Rust program runs:
- CodeLens β allocation count and total bytes above each line that allocates
- Heatmap β lines colored green β red by allocation volume
- Leak detection β lines with unfreed allocations flagged with β
- Snapshot diff β compare memory state before and after a workload
Search "ferroalloc" in the VS Code Extensions panel, or:
ext install hichammh.ferroalloc
cargo install ferroalloc-analyzer# Cargo.toml
[dependencies]
ferroalloc-probe = "0.1"// src/main.rs
use ferroalloc_probe::{FerroAllocator, start_flush_thread};
#[global_allocator]
static ALLOC: FerroAllocator = FerroAllocator;
fn main() {
start_flush_thread(7777);
// ... rest of your program
}# Terminal 1 β start the analyzer
ferroalloc-analyzer
# Terminal 2 β run your program
cargo runThen in VS Code: Cmd+Shift+P β Ferroalloc: Start Memory Tracking
Your Rust app Analyzer VS Code Extension
βββββββββββββββββ ββββββββββββ ββββββββββββββββββ
FerroAllocator ferroalloc- ferroalloc
(GlobalAlloc) βTCP:7777ββΆ analyzer βHTTP:7778ββΆ extension
captures every aggregates CodeLens + heatmap
alloc/dealloc by file:line + leak panel
resolves symbol
at runtime
ferroalloc/
βββ probe/ # ferroalloc-probe crate (add to your project)
βββ analyzer/ # ferroalloc-analyzer binary (install on your machine)
βββ vscode-extension/ # VS Code extension (install from marketplace)
| Setting | Default | Description |
|---|---|---|
ferroalloc.analyzerPort |
7778 |
HTTP port of the analyzer API |
ferroalloc.refreshIntervalMs |
1000 |
Poll interval in milliseconds |
ferroalloc.heatmapEnabled |
true |
Enable/disable background heatmap |
MIT
