linear-malloc
DISCLAIMER! This is a quick hack I did to test things. Don't use!
An ultra simple single-threaded linear allocator.
Useful to make the output of applications running under Cachegrind/Callgrind more stable (since it doesn't try to do the clever optimizations that the system allocator does).
Usage
Linux:
LD_PRELOAD=./target/debug/liblinear_malloc.so
macOS:
DYLD_INSERT_LIBRARIES=./target/debug/liblinear_malloc.dylib DYLD_FORCE_FLAT_NAMESPACE=1
Acknowledgements
Got some useful info about allocation strategies from @mtrebi's memory-allocators
, and @ezrosent's "Allocators in Rust" was a good source to help set up the basic framework.