Making Allocators Work, Part II
summary
Explains how C++11 turns the broken C++98 allocator parameter into a usable system by showing the actual implementation: SFINAE tricks with SFINAE and decltype and alias templates to detect nested types, how allocator_traits deduces pointer, difference_type and size_type, and how runtime scoped_allocator_adapter and a polymorphic allocator interface let containers and shared‑memory systems interoperate. Gives concrete code patterns, a Bloomberg BSL example, and reports the approach works with modest runtime cost and much less boilerplate.
AI-written summary · about
chapters (23)
- 0:00Introduction to allocators
- 1:08Understanding SFINAE
- 3:33Implementing type traits
- 5:55Allocator traits in C++11
- 8:25Generalized SFINAE and types
- 11:00Determining difference type
- 12:08Using pointer traits
- 14:10Q&A on SFINAE and traits
- 17:56Constructing with traits
- 20:56Designing custom allocators
- 22:44Simplified allocator design
- 24:24Bloomberg allocator model
- 28:54Q&A on runtime allocators
- 30:40Virtual interfaces and BSL
- 35:37Container implementation
- 37:20Exception safety in containers
- 42:50Pointer increment caveats
- 44:18Q&A on container design
- 46:23Uses allocator trait
- 49:40Scoped allocator adapter
- 53:49Q&A on shared memory
- 55:28Performance and design
- 1:01:56Summary and concluding Q&A
related talks
58mLocal (Arena) Memory Allocators Part 1
27m“From security to performance to GPU programming..."
36mInterfaces Matter
51mWriting Allocation Free Code in C#
01h 08mLocal (Arena) Allocators Part II
01h 00mMoving Faster: Everyday efficiency in modern C++
01h 03mFast and Small C++ - When Efficiency Matters
56m“High Performance Code 201: Hybrid Data Structures"
