checkers 0.2.1

A sanity checker for global allocations.

checkers

Documentation Crates Actions Status

Checkers is a simple allocation checker for Rust that runs purely inside of Rust.

Examples

You use checkers by installing it's allocator, then making use of either the #[checkers::test] or checkers::with! macros.

#[global_allocator]
static CHECKED: checkers::Allocator = checkers::Allocator;

#[checkers::test]
fn test_allocations() {
    let _ = Box::into_raw(Box::new(42));
}

#[test]
fn test_manually() {
    checkers::with!(|| {
        let _ = Box::into_raw(Box::new(42));
    });
}