rpmalloc 0.2.2

Cross-platform global memory allocator using rpmalloc
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use rpmalloc::*;

#[global_allocator]
static ALLOC: RpMalloc = RpMalloc;

#[test]
fn test() {
    // do some string allocations
    let s1 = "hej".to_string();
    let s2 = format!("test: {}", s1);

    // do a big vector allocation
    let mut v = Vec::<String>::with_capacity(100_000);
    v.push(s2);
}