Memory: Don't Forget to Take Out the Garbage
summary
Explains V8's generational GC with a young generation split into two semi‑spaces scavenged by a minor collector and an old generation that uses concurrent marking, sweeping and a stop‑the‑world compacting pass (Orinoco moves more work concurrent); shows a live demo leaking a global and via timers/event handlers, fixes by scoping variables and clearInterval, and uses Chrome DevTools Performance Monitor plus the collect garbage button to prove the heap jumps from ~20MB to ~400MB (baseline ~100MB); mentions pre-tenuring and practical diagnostics.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 0:35Memory
- 5:50Garbage Collection
- 7:07How Garbage Collection Works
- 9:22scavenging
- 10:33marking
- 11:09sweeping
- 12:24memory problems
- 13:23memory bloat
- 14:10baseline consumption
- 14:52memory leaks
- 15:16live demo
- 20:18summary
related talks
31mJavaScript memory management: Visual Guide
30mMemory Don't Forget To Take Out The Garbage
22mThe Hitchhiker's Guide to All Things Memory in JS
24mTrash Talk - Understanding Memory Management
26mThe Hitchhiker's Guide to All Things Memory in Javascript
27mVisualised guide to memory management in JavaScript
38mUnderstanding Memory Behavior on Nodejs
28mAlice's Adventures in Memoryland
