Practical Memory Pool Based Allocators For Modern C++
summary
An allocator instruments every allocation site at compile time and an external LLVM-based pass scans the generated LLVM bitcode to extract type sizes and call paths, auto-generating static bucket descriptors so code switches from heap to fixed-size memory pools without source changes. The allocator respects rebind, falls back to an upstream resource until pools are defined, and selects buckets by minimizing wasted bytes (prefers fewer blocks on ties). Practical caveats include local fragmentation for multi-item allocations and incomplete call graphs for virtual or indirect calls when using the instrumented allocator approach.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:10Memory allocation in real-time
- 3:19Autosar rules for allocators
- 8:34Memory pool design basics
- 16:50Bucket definitions with traits
- 22:56Allocation strategy for containers
- 28:57Fragmentation and limitations
- 31:45Allocator implementation details
- 38:48Instrumentation for analysis
- 48:30LLVM pass for bucket generation
- 50:16Summary and takeaways
- 50:57Q&A session
related talks
57m“An allocator model for std2”
01h 12mstd::allocator...
01h 01mWhat Programmers Should Know About Memory Allocation
56m“High Performance Code 201: Hybrid Data Structures"
01h 03mAn Allocator is a Handle to a Heap
15mTAILCHECK: A Lightweight Heap Overflow Detection Mechanism with Page Protection and...
01h 04mWe Live in Interesting Times
39mTemporal Dynamics - Exploring the Intricacies of Object Lifetimes in Modern C++
