rustix-dlmalloc

Crates.iorustix-dlmalloc
lib.rsrustix-dlmalloc
version0.1.7
sourcesrc
created_at2023-08-25 18:14:30.555628
updated_at2024-10-06 14:21:51.250445
descriptionA Rust port of the dlmalloc allocator, ported to rustix
homepagehttps://github.com/sunfishcode/rustix-dlmalloc
repositoryhttps://github.com/sunfishcode/rustix-dlmalloc
max_upload_size
id954951
size327,558
Dan Gohman (sunfishcode)

documentation

https://docs.rs/dlmalloc

README

rustix-dlmalloc

This is a port of the dlmalloc-rs crate to rustix.

The "global" feature currently depends on rustix-futex-sync, which is only supported on Linux.

Original README.md follows

A port of dlmalloc to Rust.

Documentation

Why dlmalloc?

This crate is a port of dlmalloc to Rust, and doesn't rely on C. The primary purpose of this crate is to serve as the default allocator for Rust on the wasm32-unknown-unknown target. At the time this was written the wasm target didn't support C code, so it was required to have a Rust-only solution.

This allocator is not the most performant by a longshot. It is primarily, I think, intended for being easy to port and easy to learn. I didn't dive too deep into the implementation when writing it, it's just a straight port of the C version.

It's unlikely that Rust code needs to worry/interact with this allocator in general. Most of the time you'll be manually switching to a different allocator :)

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 130

cargo fmt