foundation-arena 0.1.0

Heapless arena allocator
Documentation
  • Coverage
  • 57.14%
    4 out of 7 items documented1 out of 6 items with examples
  • Size
  • Source code size: 4.9 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 516.76 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jeandudey github:foundation-devices:engineers

Foundation Arena.

This crate provides an alternative to the [typed_arena] crate that does not use the heap. Instead, the [Arena] type statically allocates memory at compile-time by passing the N type parameter.

Examples

use foundation_arena::Arena;

let arena: Arena<u32, 8> = Arena::new();
let one: &mut u32 = arena.alloc(1).unwrap();
let two: &mut u32 = arena.alloc(2).unwrap();

println!("{one} {two}");