Calloc - Analog Devices VISUALDSP++ 3.5 Manual

C/c++ compiler and library for adsp-219x processors
Hide thumbs Also See for VISUALDSP++ 3.5:
Table of Contents

Advertisement

calloc

allocate and initialize memory
Synopsis
#include <stdlib.h>
void *calloc(size_t nmemb, size_t size);
Description
The
function dynamically allocates a range of memory and initial-
calloc
izes 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
function.
Error Conditions
The
function returns a null pointer if unable to allocate the
calloc
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
C/C++ Run-Time Library
free
3-41

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?

Questions and answers

Related Products for Analog Devices VISUALDSP++ 3.5

Table of Contents