| www.delorie.com/djgpp/doc/libc-2.01/libc_74.html | search |
#include <malloc.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 xfree) to free the pointer also; it just calls free.
A pointer to the memory, or NULL if no more memory is available.
Complex *x = calloc(12, sizeof(Complex)); cfree(x);
Go to the first, previous, next, last section, table of contents.
| prev next webmaster | delorie software privacy |
| Copyright © 1997 | Updated Apr 1997 |