next up previous contents index
Next: 9.5.10 smemalign: allocate aligned Up: 9.5 Memory Allocation Previous: 9.5.8 free: release an

9.5.9 smalloc: allocated uninitialized memory with explicit size

   

SYNOPSIS

#include <oskit/c/malloc.h>

void *smalloc(size_t size);

DESCRIPTION

Identical to malloc except that the user must keep track of the size of the allocated chunk and pass that size to sfree when releasing the chunk.

Calls smallocf with flags value zero to allocate the memory.

PARAMETERS

size
Size in bytes of desired allocation.

RETURNS

Returns a pointer to the allocated memory or zero if none.



University of Utah Flux Research Group