Crossware

Table of Contents        Previous topic       Next topic       

COMPILER LIBRARY FUNCTIONS->Detailed Descriptions->malloc()

Summary

#include <malloc.h>

void *malloc(size_t size);    Allocate a block of memory


Parameter

size    Bytes required in allocated block


Description

This function allocates a memory block for the user of size bytes.  The first byte of the block is guaranteed to be suitably aligned for the storage of any object.


Return Value

The function returns a pointer pointing to the first byte in the block.

A NULL value is returned if insufficient memory is available.