[−][src]Crate ruspiro_allocator
Custom Allocator for HEAP memory allocations
This crate provides a custom allocator for heap memory. If any baremetal crate uses functions and structures from
the alloc
crate an allocator need to be provided as well. However, this crate does not export any public
API to be used. It only encapsulates the memeory allocator that shall be linked into the binary.
Usage
To link the custom allocator with your project just add the usage to your main crate rust file like so:
extern crate ruspiro_allocator;
Wherever you define the usage of the ruspiro-allocator
crate within your project does not matter. But as soon
as this is done the dynamic structures requiring heap memory allocations from the alloc
crate could be used like
so:
#[macro_use] extern crate alloc; use alloc::vec::*; use alloc::boxed::*; fn main() { let mut v: Vec<u32> = vec![10, 20]; let b: Box<u16> = Box::new(10); v.push(12); }