7 releases

Uses old Rust 2015

0.2.1 Nov 9, 2020
0.2.0 Nov 6, 2020
0.1.4 May 19, 2020
0.1.3 Feb 20, 2019
0.1.1 Nov 21, 2018
Download history 4408/week @ 2020-08-09 4209/week @ 2020-08-16 3957/week @ 2020-08-23 4180/week @ 2020-08-30 4013/week @ 2020-09-06 4304/week @ 2020-09-13 4140/week @ 2020-09-20 3728/week @ 2020-09-27 4073/week @ 2020-10-04 3704/week @ 2020-10-11 3351/week @ 2020-10-18 3873/week @ 2020-10-25 3502/week @ 2020-11-01 4294/week @ 2020-11-08 5687/week @ 2020-11-15 5320/week @ 2020-11-22

16,782 downloads per month
Used in parity-util-mem

MIT/Apache

300KB
5.5K SLoC

C 3.5K SLoC // 0.4% comments Rust 2K SLoC // 0.0% comments

dlmalloc-rs

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.

Dependencies