Daily bit(e) of C++ | Custom memory resources
Daily bit(e) of C++ #424, Implementing custom C++17 memory resources using std::pmr::memory_resource.
When working with C++17 memory resources, you might want to implement a custom resource.
Fortunately, this is straightforward. The PMR library offers an abstract base class std::pmr::memory_resource.
A custom memory resource has to derive from this class and implement the private methods do_allocate, do_deallocate and do_is_equal.