The Hitchhiker's Guide to All Things Memory in Javascript
summary
Explains how V8 actually lays out memory with six V8 spaces, distinguishes new vs old generation collection, and claims scavenging copies live objects requiring roughly a double-sized copy for scavenging while old objects use mark-and-sweep causing stop the world pauses; demonstrates inspecting allocations with Chrome DevTools Heap profiler and a published interactive DevTools tutorial plus a Heapdump npm snapshot workflow; live demo has flaky network but the tutorial and slides are available and the snapshot workflow works end to end.
AI-written summary · about
chapters (12)
- 0:00Intro
- 5:32Memory is scarce
- 6:33Memory management overview
- 9:13Data Types
- 10:45Different Spaces
- 12:40Reachability
- 13:41Garbage Collection
- 15:18scavenging
- 17:24Markandsweep
- 20:40Chrome Dev Tools
- 22:13heapdump
- 23:25interactive resource
related talks
22mThe Hitchhiker's Guide to All Things Memory in JS
31mJavaScript memory management: Visual Guide
27mVisualised guide to memory management in JavaScript
38mUnderstanding Memory Behavior on Nodejs
17mAlice's Adventures in Memory Management, or how JavaScript objects work
28mAlice's Adventures in Memoryland
21mMemory: Don't Forget to Take Out the Garbage
23mWarp Speed Memory Management
