arceos_api::mem

Function ax_dealloc

Source
pub unsafe fn ax_dealloc(ptr: NonNull<u8>, layout: Layout)
Available on crate feature alloc only.
Expand description

Deallocates the memory block at the given ptr pointer with the given layout, which should be allocated by ax_alloc.

ยงSafety

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