pub unsafe fn allocate<T>(allocator: &mut dyn Allocator) -> Option<NonNull<T>>Expand description
Performs a single heap allocation, like malloc.
Uses the size and align of T for the memory layout.
§Arguments
allocator- Allocator trait implementation.
§Safety
Unsafe because of a call to allocate_aligned,
where the call is inherently unsafe because we aren’t certain the allocation will succeed.