Yes, there is: Felix Petriconi's
Allocator Builder library (GitHub)
Quoting from the repository description:
A highly composable, policy based C++ allocator.
The layout idea of the library is was presented by Andrei Alexandrescu
at the C++ and Beyond 2013 seminar and at the CppCon 2015.
So just what OP asked for. Additional general information:
The composable allocators provided as of March 2017 are:
- affix_allocator: Allows to automatically pre- and sufix allocated regions.
- allocator_with_stats: An allocator that collects a configured number of statistic information, like number of allocated bytes, number of successful expansions and high tide
- bucketizer: Manages a bunch of Allocators with increasing bucket size
- fallback_allocator: Either the default Allocator can handle a request, otherwise it is passed to a fall-back Allocator
- (aligned_)mallocator: Provides and interface to systems ::malloc(), the aligned variant allocates according to a given alignment
null_allocator An Null allocator
- segregator: Separates allocation requests depending on a threshold to Allocator A or B
- (shared_)freelist: Manages a list of freed memory blocks in a list for faster re-usage. (The Shared variant is thread safe)
- (shared_)cascading_allocator: Manages in a thread safe way Allocators and automatically creates a new one when the previous are out of memory. (The Shared variant is thread safe, but it needs further improvements, because it does not frees unused allocators)
- (shared_)heap: A heap block based heap. (The Shared variant is thread safe manner with minimal overhead and as far as possible in a lock-free way.)
- stack_allocator: Provides a memory access, taken from the stack
So it's a solid base to start off of. Lots of GitHub 'stars' and followers, too.