This is an implementation of the memory allocator discussed in the Crafting Memory Allocators blog post.
The build and benchmarks were tested on macOS.
cmake -B build-release -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O3 -flto" .
make -C build-releasecmake -B build-debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-O0 -g3" .
make -C build-debugstd::deque<T>
build-release/benchmark-dequestd::list<T>
build-release/benchmark-liststd::list<T>with longstd::string
build-release/benchmark-list-huge-elementstd::map<K, V>
build-release/benchmark-mapstd::unordered_map<K, V>
build-release/benchmark-unordered-mapstd::vector<V>
build-release/benchmark-vectorDYLD_INSERT_LIBRARIES=./build-release/libmalloc_replacement.dylib DYLD_FORCE_FLAT_NAMESPACE=1 <command>