2 unstable releases

Uses old Rust 2015

0.1.0 Feb 16, 2016
0.0.1 Jul 9, 2015

#422 in Memory management

Download history 6059/week @ 2024-02-27 6794/week @ 2024-03-05 6496/week @ 2024-03-12 8850/week @ 2024-03-19 8216/week @ 2024-03-26 7660/week @ 2024-04-02 8157/week @ 2024-04-09 7458/week @ 2024-04-16 7860/week @ 2024-04-23 9079/week @ 2024-04-30 7173/week @ 2024-05-07 6965/week @ 2024-05-14 6414/week @ 2024-05-21 5883/week @ 2024-05-28 7047/week @ 2024-06-04 6796/week @ 2024-06-11

27,216 downloads per month
Used in 99 crates (5 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