Next: Process Control Up: C Standard Library Functions Previous: Mathematics

Memory Allocation

#include <malloc.h>

void *calloc(size_t num elems, size_t elem_size) - Allocate an array and initialise all elements to zero .

void free(void *mem address) - Free a block of memory.

void *malloc(size_t num bytes) - Allocate a block of memory.

void *realloc(void *mem address, size_t news i ze) - Reallocate (adjust size) a block of memory.


Dave.Marshall@cm.cf.ac.uk
Wed Sep 14 10:06:31 BST 1994