delorie.com/djgpp/doc/libc/libc_81.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <stdlib.h> void *calloc(size_t num_elements, size_t size); |
This function allocates enough memory for num_elements objects of size size. The memory returned is initialized to all zeros. The pointer returned should later be passed to free (see section free) so that the memory can be returned to the heap.
You may use cfree (see section cfree) to free the pointer also; it just calls free.
A pointer to the memory, or NULL
if no more memory is available.
ANSI/ISO C | C89; C99 |
POSIX | 1003.2-1992; 1003.1-2001 |
Complex *x = calloc(12, sizeof(Complex)); cfree(x); |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |