Making Allocators Work, Part I
summary
Explains the concrete C++11/14 changes: introduces allocator_traits and a polymorphic allocator runtime model, shows a built example — a monotonic memory resource that allocates from a stack buffer and falls back to heap — used to back three vectors of 100 doubles. Demonstrates it works and makes prior allocator experiments practical, but reports measurable caveats: occasional slower fallback allocations, no per-allocation deallocation, stack exhaustion and alignment pitfalls, and allocator propagation defaults that do not move state.
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:15Topics to cover
- 2:36What is an allocator?
- 3:19Goal: per-object allocation
- 4:52Motivating Examples
- 6:53Buffered Sequential Allocator: design
- 9:50Buffered Sequential Allocator: benefits
- 10:26Buffered Sequential Allocator: risks
- 22:00Example of Using Allocators Library Fundamentals Polymorphic Allocators
- 27:02Vocabulary Types
- 30:33Weasel Words
- 38:54Allocator Propagation
- 41:02Allocator Traits
related talks
58mLocal (Arena) Memory Allocators Part 1
51mUnderstanding Allocator Impact on Runtime Performance in C++
01h 08mLocal (Arena) Allocators Part II
27m“From security to performance to GPU programming..."
01h 41mLocal (arena) Memory Allocators
51mWriting Allocation Free Code in C#
01h 01mFaster, Easier, Simpler Vectors
36mInterfaces Matter
