smartalloc 0.2.0

Smartalloc rust binding
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use core::alloc::{GlobalAlloc, Layout};

use smartalloc::SmartAlloc;

#[global_allocator]
static GLOBAL: SmartAlloc = SmartAlloc;

fn main() {
    unsafe {
        let alloc = SmartAlloc;
        let layout = Layout::from_size_align(8, 8).unwrap();
        alloc.alloc(layout);
    }
}