[][src]Function hermit::__sys_free

pub unsafe fn __sys_free(ptr: *mut u8, size: usize, align: usize)

Interface to deallocate a memory region from the system heap

Safety

This function is unsafe because undefined behavior can result if the caller does not ensure all of the following:

  • ptr must denote a block of memory currently allocated via this allocator,
  • size and align must be the same values that were used to allocate that block of memory ToDO: verify if the same values for size and align always lead to the same layout

Errors

May panic if debug assertions are enabled and invalid parameters size or align where passed.