Crate libc_alloc

source ·
Expand description

A simple global allocator which hooks into libc. Useful when linking no_std + alloc code into existing embedded C code.

Uses memalign for allocations, and free for deallocations. On Windows, uses _aligned_* functions.

§Example

use libc_alloc::LibcAlloc;

#[global_allocator]
static ALLOCATOR: LibcAlloc = LibcAlloc;

Structs§

  • Global Allocator which hooks into libc to allocate / free memory.