|
| 1 | +# dlmalloc-rs |
| 2 | + |
| 3 | +A port of [dlmalloc] to Rust. |
| 4 | + |
| 5 | +[](https://travis-ci.com/alexcrichton/dlmalloc-rs) |
| 6 | + |
| 7 | +[Documentation](https://docs.rs/dlmalloc) |
| 8 | + |
| 9 | +[dlmalloc]: http://g.oswego.edu/dl/html/malloc.html |
| 10 | + |
| 11 | +## Why dlmalloc? |
| 12 | + |
| 13 | +This crate is a port of [dlmalloc] to Rust, and doesn't rely on C. The primary |
| 14 | +purpose of this crate is to serve as the default allocator for Rust on the |
| 15 | +`wasm32-unknown-unknown` target. At the time this was written the wasm target |
| 16 | +didn't support C code, so it was required to have a Rust-only solution. |
| 17 | + |
| 18 | +This allocator is not the most performant by a longshot. It is primarily, I |
| 19 | +think, intended for being easy to port and easy to learn. I didn't dive too deep |
| 20 | +into the implementation when writing it, it's just a straight port of the C |
| 21 | +version. |
| 22 | + |
| 23 | +It's unlikely that Rust code needs to worry/interact with this allocator in |
| 24 | +general. Most of the time you'll be manually switching to a different allocator |
| 25 | +:) |
| 26 | + |
| 27 | +# License |
| 28 | + |
| 29 | +This project is licensed under either of |
| 30 | + |
| 31 | + * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or |
| 32 | + http://www.apache.org/licenses/LICENSE-2.0) |
| 33 | + * MIT license ([LICENSE-MIT](LICENSE-MIT) or |
| 34 | + http://opensource.org/licenses/MIT) |
| 35 | + |
| 36 | +at your option. |
| 37 | + |
| 38 | +### Contribution |
| 39 | + |
| 40 | +Unless you explicitly state otherwise, any contribution intentionally submitted |
| 41 | +for inclusion in this project by you, as defined in the Apache-2.0 license, |
| 42 | +shall be dual licensed as above, without any additional terms or conditions. |
0 commit comments