malloc

Allocates heap memory.

void * malloc (size_t size);

void * __malloc31 (size_t size);

void * __malloc24 (size_t size);

Required Header
<stdlib.h>

Return Value

Each of these functions return the pointer to the allocated heap block. NULL indicates an error.

Parameters

size

  The number of bytes to allocate

Remarks

The malloc function attempts to allocate size bytes from the heap and return a pointer to the allocated block. __malloc31 and __malloc24 are special versions to ensure the memory allocated is positioned within certain system boundaries required for some operating requirements.

Standard Library

See Also    _alloca, calloc, free, realloc