Luna::memfree
void memfree(void *ptr, usize alignment=0)
Frees heap memory.
Parameters
-
in ptr
The pointer returned by memalloc or memrealloc. If this is
nullptr
, this function does nothing. -
in alignment
Optional. The alignment requirement specified when allocating the memory block. Default is 0.
Valid Usage
- If
ptr
is notnullptr
,alignment
must be equal toalignment
passed to memalloc or memrealloc which allocatesptr
.