| Crates.io | linear-malloc |
| lib.rs | linear-malloc |
| version | 0.1.0 |
| created_at | 2022-02-22 00:49:41.25588+00 |
| updated_at | 2022-02-22 00:49:41.25588+00 |
| description | An ultra simple single-threaded linear allocator |
| homepage | |
| repository | https://github.com/madsmtm/linear-malloc |
| max_upload_size | |
| id | 537069 |
| size | 4,363 |
linear-mallocAn 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).
Linux:
cargo build
LD_PRELOAD=./target/debug/liblinear_malloc.so your-binary
macOS:
cargo build
DYLD_INSERT_LIBRARIES=./target/debug/liblinear_malloc.dylib DYLD_FORCE_FLAT_NAMESPACE=1 your-binary
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.