#rest

memalloc

Memory allocation in stable rust

2 unstable releases

Uses old Rust 2015

0.1.0 Feb 16, 2016
0.0.1 Jul 9, 2015

#1349 in HTTP server

Download history 7668/week @ 2024-07-21 8289/week @ 2024-07-28 11775/week @ 2024-08-04 9307/week @ 2024-08-11 11510/week @ 2024-08-18 12682/week @ 2024-08-25 14371/week @ 2024-09-01 11382/week @ 2024-09-08 9513/week @ 2024-09-15 10517/week @ 2024-09-22 11775/week @ 2024-09-29 11513/week @ 2024-10-06 11096/week @ 2024-10-13 11563/week @ 2024-10-20 12383/week @ 2024-10-27 11929/week @ 2024-11-03

48,305 downloads per month
Used in 105 crates (4 directly)

MIT license

6KB
91 lines

memalloc

Raw allocation APIs in stable rust.

Documentation

Usage

See the tests at the bottom of src/lib.rs for some examples.

Use the crates.io repository; add this to your Cargo.toml along with the rest of your dependencies:

[dependencies]
memalloc = "0.1"

Author

Jonathan Reem is the primary author and maintainer of memalloc.

License

MIT


lib.rs:

memalloc

Memory allocation in stable rust, providing a similar interface to std::rt::heap, notably these functions align everything according to the alignment of u8, rather than using a user-provided alignment.

Additionally, they do not allow for handling allocation failure, and will simply abort the process on OOM. Unfortunately, this limitation is unavoidable if we want to use only stable APIs.

No runtime deps