Optimal Heap Limits for Reducing Browser Memory Use
summary
Proposes a concrete formula: set each heap limit to live size plus extra proportional to the square-root heap limit of live size, which provably minimizes total memory for any allowed GC time and coordinates multiple heaps with no inter-heap communication. Implements the rule as a V8 prototype (≈200 lines of code that measure allocation and scan rates), removing about 250 lines of ad-hoc idle-GC code. Evaluated on real sites (Twitter, CNN, Facebook, Fox, ESPN) and reports ~16.0% memory reduction and up to 30.0% GC-time improvement on heavy benchmarks.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 1:49Space Time Tradeoff Curve
- 5:00Mathematical Model
- 8:31Everyone Else
- 10:40Implementation
- 13:46Evaluation
related talks
22mThe Hitchhiker's Guide to All Things Memory in JS
53mPlugging Memory Leaks With The Chrome Dev Tools
31mJavaScript memory management: Visual Guide
29mEffectively Managing Memory At Gmail Scale
35mMemory Chronicles: Manage, Trace and Fix Memory Leaks
39mMemory Efficient Java
30mMemory Don't Forget To Take Out The Garbage
21mMemory: Don't Forget to Take Out the Garbage
