Polymorphic allocator library
The C++ Extensions for Library Fundamentals includes classes for providing allocator type erasure and runtime polymorphism.
The memory_resource class is an abstract interface for classes that encapsulate memory resources.
The library provides the following concrete classes:
Defined in header
|Pool resources are a type of memory_resource for managing allocations in pools of different block sizes. The library provides both a thread-safe and unsafe pool resource.|
|std::experimental::pmr::monotonic_buffer_resource||A special-purpose memory_resource intended for very fast memory allocations in situations where memory is used to build up a few objects and then is released all at once when the buffer is destroyed.|
Using a specialization of the class template
pmr::polymorphic_allocator with an allocator-aware class allows allocators to be used polymorphically at run time.
The template alias
resource_adaptor wraps a memory_resource interface around an allocator.