1 unstable release
0.1.0 | Jun 11, 2022 |
---|
#1325 in Embedded development
4KB
One Alloc
A custom allocator that allows a singular allocation of a specific size known ahead of time.
For situations where one allocation is required, but otherwise allocations are not allowed (usually for constrained embedded devices). Extremely small (only 32 lines of code).
lib.rs
:
A custom allocator that allows a singular allocation of a specific size known ahead of time.
Getting Started
This example allocates once by creating an Arc
of the unit tuple ()
.
Requires libc for printing, but can be replaced with a serial port
implementation.
Run with cargo +nightly run --example main
from within the repo.