_scalloc()

Allocate space for an array

Synopsis:

#include <malloc.h>

void* _scalloc( size_t size );

Arguments:

size
The number of bytes to allocate.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

This function is in libc.a, but not in libc.so (in order to save space).

Description:

The _scalloc() functions allocate space for an array of length size bytes. Each element is initialized to 0.

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

Returns:

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

Classification:

QNX Neutrino

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

Last modified: 2013-12-23

comments powered by Disqus