qadapt 1.0.4

The Quick And Dirty Allocation Profiling Tool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use qadapt::no_alloc;
use qadapt::QADAPT;

#[global_allocator]
static Q: QADAPT = QADAPT;

#[no_alloc]
fn does_allocate() -> Box<u8> {
    Box::new(0)
}

fn main() {
    // If you were to run `cargo run --example release_mode`, this program blows up.
    // If, however, you ran `cargo run --release --example release_mode`,
    // nothing interesting will happen since panic-related code is stripped
    // for release builds.
    does_allocate();
}