Function arceos_api::mem::ax_alloc

source ·
pub unsafe fn ax_alloc(layout: Layout) -> Option<NonNull<u8>>
Available on crate feature alloc only.
Expand description

Allocates a continuous memory blocks with the given layout in the global allocator.

Returns None if the allocation fails.

§Safety

This function is unsafe because it requires users to manually manage the buffer life cycle.