[][src]Crate static_alloc

General purpose global allocator(s) with static storage.

Provides an allocator for extremely resource constrained environments where the only memory guaranteed is your program's image in memory as provided by the loader. Possible use cases are OS-less development, embedded, bootloaders (even stage0/1 maybe, totally untested).

Usage

use static_alloc::Slab;

#[global_allocator]
static A: Slab<[u8; 1 << 16]> = Slab::uninit();

fn main() {
    let v = vec![0xdeadbeef_u32; 128];
    println!("{:x?}", v);
}

Structs

Slab

An allocator whose memory resource has static storage duration.