monty-alloc 0.0.21

Global allocator enforcing a Monty worker's hard memory ceiling.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Verifies that merely linking `monty-alloc` does not claim to meter memory.

/// Limits require `LimitedAllocator` to be selected by the final executable.
#[test]
fn set_limit_rejects_the_default_allocator() {
    let error = monty_alloc::set_limit(Some(1024), false).unwrap_err();
    assert_eq!(
        error.to_string(),
        "monty-alloc is not installed as the global allocator"
    );
}