Memory Allocation Routines


malloc, mt_malloc


Syntax

#include <malloc.h>
void *malloc(int size);
void *mt_malloc(int size);

Arguments

size      size of the area to reserve

Return Value

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

Description

Reserves a memory block that is greater in size than the area that was reserved by InitHeap function where the memory to be reserved is 16-bit aligned. mt_malloc is the multi-thread compatible version of malloc. Interruption is inhibited when processing 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