Trait method lrs::alloc::Allocator::allocate_array

Allocates an array of the specified type.

Syntax

unsafe fn allocate_array<T>(pool: &mut <Self as Allocator>::Pool, num: usize) -> Result<*mut T, Errno>

Arguments

NameDescription
pool

The pool from which to draw memory.

num

The number of elements in the array.

Return value

Returns a pointer to an allocated array.

Remarks

If T has size 0, a call to this function behaves like a call to empty_ptr. Otherwise, if num is 0, the behavior is undefined.