2 unstable releases

Uses old Rust 2015

0.1.0 Feb 16, 2016
0.0.1 Jul 9, 2015

#543 in Memory management

Download history 7329/week @ 2023-12-05 5636/week @ 2023-12-12 5031/week @ 2023-12-19 5704/week @ 2023-12-26 4656/week @ 2024-01-02 5433/week @ 2024-01-09 7376/week @ 2024-01-16 6250/week @ 2024-01-23 7859/week @ 2024-01-30 9436/week @ 2024-02-06 6586/week @ 2024-02-13 5488/week @ 2024-02-20 6059/week @ 2024-02-27 6794/week @ 2024-03-05 6496/week @ 2024-03-12 7391/week @ 2024-03-19

27,670 downloads per month
Used in 86 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