Memory Allocation Routines


calloc, mt_calloc


Syntax

#include <malloc.h>
void *calloc(size_t num, size_t size);
void *mt_calloc(size_t num, size_t size);

Arguments

num       number of elements
size      size in bytes of each element

Return Value

The pointer to the beginning of the reserved area or NULL if it fails to
reserve an area 

Description

It Reserves a memory block with num number of elements of size bytes each in the area that was reserved by the InitHeap function. mt_calloc is the multi-thread compatible version of calloc. Interruption is inhibited when process is being performed to prevent malfunction if used by more than one thread.


Revision History

6/1/99 Added explanation of the multi-thread version