Function silc_smalloc
SYNOPSIS
void *silc_smalloc(SilcStack stack, SilcUInt32 size);
DESCRIPTION
Allocate memory block of size of `size' from the stack indicated by
`stack' and return pointer to it. Returns NULL on error. This
function allocates aligned memory so it can be used to allocate
memory for structures, for example. If you allocate strings or
data buffers using silc_smalloc_ua is recommended instead of this
function.
NOTES
Be careful with this function: do not free the returned pointer
explicitly and do not save the returned pointer to a permanent
location.
If `stack' is NULL this function calls silc_malloc.
|