~/talk

Taming Dynamic Memory - An Introduction to Custom Allocators

Talkat ACCU 2019 · 2019-04-10..04-13· [c-and-cpp]
slides:none on file

Explains how a monotonic allocator gives O(1) allocate, only bulk reset (example: reset a 42‑byte buffer) and avoids external fragmentation but loses per-allocation frees; shows pool allocator tradeoffs (chunk size vs internal fragmentation, diffusion of free list) and how a multi‑pool reduces worst‑case waste. Demonstrates std::pmr polymorphic memory_resource, builtins like new_delete_resource and synchronized/unsynchronized pools, and chaining upstream resource behavior for fallback and profiling hooks. Practical advice: measure, reserve for vectors, and prefer special allocators for known lifetimes.

AI-written summary · about

  1. 0:00Introduction
  2. 1:08Problems with global allocators
  3. 8:07Monotonic allocators
  4. 12:36Use cases and benefits
  5. 19:02STL containers and strategies
  6. 26:30Extending allocation logic
  7. 28:49Padding and alignment
  8. 38:50Dangers of over-engineering
  9. 43:07Pool allocators
  10. 50:55Multi-pool allocators
  11. 1:00:16C++ PMR library support
  12. 1:13:58Summary and conclusions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.