Memory Profiling for Mere Mortals
summary
Reproduces a leaking node server with curl / Apache benchmark, forces collection with --expose-gc, and grabs heap snapshot files (heapdump) to compare retained sizes and find the exact closure holding strings; demo shows a watcher/file‑changed callback leaking and how renaming or fixing function references removes retention. Shows a built sampling tool using v8 allocation sampling to attribute objects to call stacks and visualizes results with a sunburst/flame view so allocation hotspots and offending functions are obvious.
AI-written summary · about
chapters (9)
- 0:00Start
- 0:42Profiling Memory
- 4:08The Toy Collector
- 7:44Memory Leak
- 9:23Registered Event Handlers
- 10:01The Garbage Struct
- 10:53Root Node
- 12:26Reference Counting
- 21:06How Do I Take a Memory Snapshot
related talks
38mUnderstanding Memory Behavior on Nodejs
24mDemystifying Memory Leaks in JavaScript
46mTracking Down a Memory Leak
28mMemory Profiling for Mere Mortals
35mMemory Chronicles: Manage, Trace and Fix Memory Leaks
14mExample Debugging Session using DTrace and MDB
43mFinding memory leaks and CPU bottlenecks with Node.js debug tools
42mDebugging Ruby
