The Hitchhiker's Guide to All Things Memory in JS
summary
Explains how V8 divides the heap into new space, old pointer/old data, large object (>8 MB) and code space, and why V8 uses a generational GC: scavenging (copying live objects A→B in new space) and mark-and-sweep in old space, plus stop-the-world pauses. Shows Chrome DevTools heap snapshot workflow (shallow vs retained size, distance) to find detached DOM elements, and lists Node tools: memwatch, heapdump, v8 profiler; links leaks to crashing tabs and frequent GC causing jank.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:03History of Computing
- 2:58Memory Management Basics
- 5:14V8 Heap Structure
- 8:22Garbage Collection Process
- 11:25Collection Techniques
- 13:23Profiling and Debugging
- 16:58Node.js Memory Tools
- 18:24Real-world Memory Issues
- 20:53Conclusion
related talks
26mThe Hitchhiker's Guide to All Things Memory in Javascript
31mJavaScript memory management: Visual Guide
38mUnderstanding Memory Behavior on Nodejs
21mMemory: Don't Forget to Take Out the Garbage
27mVisualised guide to memory management in JavaScript
24mTrash Talk - Understanding Memory Management
28mAlice's Adventures in Memoryland
17mAlice's Adventures in Memory Management, or how JavaScript objects work
