Taming dynamic memory
summary
Taming dynamic memory argues that locality and explicit allocator choice beat vague “examples” and global new/delete by showing concrete strategies, costs and failures: monotonic allocator (pointer bump, reset-only, fits per-frame or request lifetimes), chunked pool and size-class multipool (deterministic time, internal waste, diffusion), and C++17’s polymorphic memory resource with chaining. The talk lists concrete pitfalls—fragmentation, padding, ABA, realloc and zero-size quirks—gives real use cases (frames, web requests) and warns against DIY general-purpose allocators.
AI-written summary · about
chapters (25)
- 0:00Intro
- 0:17About me
- 0:37Overview
- 1:12General purpose allocator
- 2:20Fragmentation
- 3:28Coalescing
- 4:47Problems with det allocator
- 11:45Monotonic Allocator - Reclamation
- 14:07Where is this actually useful?
- 18:05Monotonic Allocator - STL containers
- 19:31unordered sap
- 21:46Stack Allocator
- 24:17Alignment
- 28:49Padding
- 29:38Monotonic Allocator - Extensions
- 32:09The Bottom Line
- 34:39Pool Allocator - Reclamation
- 36:18Pool Allocator - Diffusion
- 39:37Pool Allocator - STL containers
- 43:12Allocator support in C++
- 46:36C++ Memory Resources?
- 48:06Chaining
- 52:21There's no universal interface for allocators
- 55:36Don't underestimate the global allocator
- 57:59Wrapping up
related talks
50mTwo advanced PMR techniques in C++17/20
50mDesigning and Implementing a new Allocator model
57mDynamic memory allocation challenges in safety critical systems
56mC++ Relocation - How to Achieve Blazing Fast Save and Restore and More!
32mThe Impact of Memory Allocators on Performance: A Deep Dive
29mWrangling memory leaks where you thought they could never happen
37mTrack your memory allocation
26mAllocating Less: Really Thin Rust Cloud Apps
