1 2 3 4 5 6 7 8 9 10 11 12
//! Raw FFI wrapper over the mimalloc memory allocator #![no_std] use libc::{size_t, c_void}; extern "C" { pub fn mi_malloc(size: size_t) -> *mut c_void; pub fn mi_calloc(count: size_t, size: size_t) -> *mut c_void; pub fn mi_realloc(p: *mut c_void, newsize: size_t) -> *mut c_void; pub fn mi_expand(p: *mut c_void, newsize: size_t) -> *mut c_void; pub fn mi_free(p: *mut c_void); pub fn mi_malloc_aligned(size: size_t, alignment: size_t) -> *mut c_void; }