mimalloc-rust 0.2.1

the best binding for mimalloc in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mod heap;

use crate::raw::runtime_options::mi_option_show_stats;

use crate::GlobalMiMalloc;

#[global_allocator]
static GLOBAL_MIMALLOC: GlobalMiMalloc = GlobalMiMalloc;

#[test]
fn test_malloc() {
    GlobalMiMalloc::option_enable(mi_option_show_stats);
    let _vec: Vec<u8> = vec![0; 114514];
    println!("mimalloc: \n{:?}", GLOBAL_MIMALLOC);
}