Skip to content

AlexK0/simple-allocator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Simple Allocator

This is an implementation of the memory allocator discussed in the Crafting Memory Allocators blog post.

The build and benchmarks were tested on macOS.

Release build

cmake -B build-release -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O3 -flto" .
make -C build-release

Debug build

cmake -B build-debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-O0 -g3" .
make -C build-debug

Benchmarks

  • std::deque<T>
build-release/benchmark-deque
  • std::list<T>
build-release/benchmark-list
  • std::list<T> with long std::string
build-release/benchmark-list-huge-element
  • std::map<K, V>
build-release/benchmark-map
  • std::unordered_map<K, V>
build-release/benchmark-unordered-map
  • std::vector<V>
build-release/benchmark-vector

Replacing the default system malloc

DYLD_INSERT_LIBRARIES=./build-release/libmalloc_replacement.dylib DYLD_FORCE_FLAT_NAMESPACE=1 <command>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published