Function malloc

Source
pub fn malloc(size: usize, align: usize) -> Option<NonNull<u8>>
Expand description

Allocate a memory block. Normally Box or SizedPool should be used instead of this function.

size - The size of the memory block to allocate. align - The alignment of the memory block.

Returns a pointer to the allocated memory block if the allocation was successful, or None if the allocation failed.