pub unsafe fn allocate_array<T>(
allocator: &mut dyn Allocator,
size: usize,
) -> Option<NonNull<T>>Expand description
Allocates an array of size size.
§Arguments
allocator- Allocator trait implementation.size- Ausizeproviding the size of the array to be allocated.
§Safety
Unsafe because of a call to allocate_aligned,
where the call is inherently unsafe because we aren’t certain the allocation will succeed.