rust-assert-no-alloc
rust-assert-no-alloc copied to clipboard
Custom Rust allocator allowing to temporarily disable memory (de)allocations for a thread. Aborts or prints a warning if allocating although forbidden.
Hi! Thanks for maintaining this crate, we find it useful. I was wondering if you would consider releasing a new version on crates.io, since the inclusion of #10 and #9...
Resolves #15 Proof of concept to permit deallocations (but still disallow allocations). Not sure if this is a very clean solution; any feedback is appreciated!
Could you please add some kind of option or a separate `assert_no_...` function to only disallow alloc, but permit dealloc? For my use case I currently really only care about...
Hi! Compilation fails at doc tests when running `cargo test --release`. When running `cargo test` it works fine and non doc tests also compile and run with `cargo test --release`....
It should be possible to compose the functions so that `assert_no_alloc(|| permit_alloc(|| assert_no_alloc(|| ...)))` causes allocations in the `...` part to trigger a panic.
Investigating the feasibility of cross compiling my application from Linux to Windows to find out if I'll need Windows for CI, I tried building for the x86_64-pc-windows-gnu target and running...
```shell cargo test --all-targets --all-features --locked --frozen --offline ``` ```rust // Passes #[test] fn does_not_alloc() { assert_no_alloc(|| { let xs: Vec = Vec::with_capacity(0); assert_eq!(0, xs.capacity()); }); } ``` ```rust //...
Thanks for all your work on this awesome crate! I'm trying to use this in the context of a VST2 plugin (plugin for audio workstation app). In a VST2 plugin...
In response to #5, the usage of the `external_doc` feature was abandoned in favor of supporting stable rust by copy-pasting the README file into lib.rs. This should be undone when...
currently, only allocation is tested