[Previous] [Contents] [Next]

_smalloc()

Allocate memory

Synopsis:

#include <malloc.h>

void* _smalloc( size_t size );

Library:

libc

Description:

The _smalloc() function allocates space for an object of size bytes. Nothing is allocated when the size argument has a value of zero.


Note: This function allocates memory in blocks of _amblksiz bytes; _amblksiz is a global variable defined in <stdlib.h>.

You must use _sfree() to deallocate the memory allocated by _smalloc().

Returns:

A pointer to the start of the allocated memory, or NULL if there's insufficient memory available, or if the requested size is zero.

Classification:

QNX 6

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

See also:

calloc(), free(), realloc(), _scalloc(), _sfree(), _srealloc()


[Previous] [Contents] [Next]