On this page
Function std::intrinsics::const_allocate
pub unsafe extern "rust-intrinsic" fn const_allocate(
size: usize,
align: usize
) -> *mut u8
🔬This is a nightly-only experimental API. (
core_intrinsics
)
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.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/intrinsics/fn.const_allocate.html