![]() |
![]() |
![]() |
Allocate space for an array
#include <malloc.h> void* _scalloc( size_t size );
libc
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().
The _scalloc() function returns a pointer to the start of the allocated memory. The return value is NULL if there is insufficient memory available or if the size is zero.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
calloc(), free(), realloc(), _sfree(), _smalloc(), _srealloc()
![]() |
![]() |
![]() |