macro_rules! global_jit_alloc {
($static_var:path) => { ... };
($provider:expr) => { ... };
}Available on crate feature
custom_jit_alloc only.Expand description
Defines a global JitAlloc implementation which GlobalJitAlloc will defer to.
The macro can either take a path to a static variable or an expression resolving to a
&'static JitAlloc:
ⓘ
static GLOBAL_JIT: MyJitAlloc = MyJitAlloc::new();
global_jit_alloc!(GLOBAL_JIT);ⓘ
use std::sync::OnceLock;
global_jit_alloc!({
static WRAPPED_JIT: OnceLock<MyJitAlloc> = OnceLock::new();
WRAPPED_JIT.get_or_init(|| MyJitAlloc::new())
});