next up previous contents index
Next: 9.5.12 mallocf: allocate uninitialized Up: 9.5 Memory Allocation Previous: 9.5.10 smemalign: allocate aligned

9.5.11 sfree: release a memory block with explicit size

   

SYNOPSIS

#include <oskit/c/malloc.h>

void sfree(void *buf, size_t size);

DESCRIPTION

Frees a block of memory with the indicated size. Calls lmm_free to release the memory.

Note that sfree must only be called with memory allocated by one of: smalloc, smallocf, smemalign, or smemalignf and that the size given must match that used on allocation.

PARAMETERS

buf
Pointer to memory to be freed.
size
Size of memory block being freed.



University of Utah Flux Research Group