Most Malleable Memory Management Method
summary
Demonstrates using C++ PMR to cut allocation churn and tune locality: baseline run records 133,540 allocations with heaptrack, then swapping to an unsynchronized_pool_resource reduces allocations to about 84, massively lowering allocator overhead. Shows building a tracing memory_resource, explains cascading resources (monotonic_buffer_resource → pool → new_delete), and details how custom types must expose an allocator alias plus allocator-aware copy/move ctors. Notes PMR increases per-object size (extra pointers) and that tools are essential.
AI-written summary · about
chapters (11)
- 0:00Memory management challenges
- 7:34Polymorphic memory resources
- 15:43Tracing memory resource demo
- 21:30Heap Track baseline
- 22:32Optimizing with PMR allocators
- 30:35Cascading memory resources
- 39:54PMR debugging pitfalls
- 42:57Custom PMR-compatible types
- 51:02Advantages and drawbacks of PMR
- 57:07Advanced PMR use cases
- 58:48Q&A on best practices
related talks
49mMost Malleable Memory Management Method in C++
01h 25mTaming Dynamic Memory - An Introduction to Custom Allocators
01h 01mAllocators: The Good Parts
06mLightning Talk: Speeding up code with C++17 Polymorphic Memory Resources
01h 01mGetting Allocators out of Our Way
01h 01mRecipes for Reducing Allocations by C++ Containers
57m“An allocator model for std2”
27m“From security to performance to GPU programming..."
