Download VisualDSP++ 3.5 C/C++ Compiler and Library

Transcript
C/C++ Run-Time Library
calloc
allocate and initialize memory
Synopsis
#include <stdlib.h>
void *calloc(size_t nmemb, size_t size);
Description
The calloc function dynamically allocates a range of memory and initializes all locations to zero. The number of elements (the first argument)
multiplied by the size of each element (the second argument) is the total
memory allocated. The memory may be deallocated with the free
function.
Error Conditions
The calloc function returns a null pointer if unable to allocate the
requested memory.
Example
#include <stdlib.h>
int *ptr;
ptr = (int *) calloc(10, sizeof(int));
/* ptr points to a zeroed array of length 10 */
See Also
free, malloc, realloc
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
3-41