pub unsafe extern "rust-intrinsic" fn const_allocate(
    size: usize,
    align: usize
) -> *mut u8
🔬 This is a nightly-only experimental API. (core_intrinsics)
Expand description

Allocates a block of memory at compile time. At runtime, just returns a null pointer.

Safety

  • The align argument must be a power of two.
    • At compile time, a compile error occurs if this constraint is violated.
    • At runtime, it is not checked.
This documentation is an old archive. Please see https://rust.docs.kernel.org instead.