On this page
Function std::intrinsics::const_deallocate
pub unsafe extern "rust-intrinsic" fn const_deallocate(
ptr: *mut u8,
size: usize,
align: usize
)
🔬This is a nightly-only experimental API. (
core_intrinsics
)
Deallocates a memory which allocated by intrinsics::const_allocate
at compile time. At runtime, does nothing.
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.
- If the
ptr
is created in an another const, this intrinsic doesn’t deallocate it. - If the
ptr
is pointing to a local variable, this intrinsic doesn’t deallocate it.
© 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_deallocate.html