An allocator is a handle to a heap
summary
Claims that an allocator can be a true handle to a heap versus merely carrying state and gives concrete code and runtime behavior: implements a PMR-like allocator whose value is a memory_resource pointer — value is a pointer to a heap and contrasts it with a conforming allocator whose value is a fill character — value is a fill character, not a heap handle. Demonstrates with struct padding and move tests and with two lists on different heaps that calling std::swap yields undefined behavior on swap and leads to deallocate-time crashes.
AI-written summary · about
related talks
57m“An allocator model for std2”
01h 04mHow to Write a Custom Allocator
01h 01mAllocators: The Good Parts
49mMost Malleable Memory Management Method in C++
01h 25mTaming Dynamic Memory - An Introduction to Custom Allocators
01h 01mGetting Allocators out of Our Way
01h 03mMost Malleable Memory Management Method
01h 02m“Lightweight Object Persistence With Relocatable Heaps in Modern C++"
