checkers 0.2.2

A sanity checker for global allocations.
Documentation

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 checkers::Allocator as your 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));
    });
}