Function const_allocate
unsafe const fn const_allocate(_size: usize, _align: usize) -> *mut u8
Allocates a block of memory at compile time. At runtime, just returns a null pointer.
Safety
- The
alignargument must be a power of two.- At compile time, a compile error occurs if this constraint is violated.
- At runtime, it is not checked.