malloc [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Library Reference Manual
malloc
Allocates a block of memory.
Syntax
#include <stdlib.h>
void *malloc (size_t size);
Parameters
size The number of bytes in the block to be allocated.
Return Values
x A pointer to an allocated block of memory.
NULL There is not enough memory available, or size is 0.
Description
The malloc function returns a pointer to a block of at least size bytes
suitably aligned for any use.
The malloc and free functions provide a simple generalized memory
allocation package.
Undefined results occur if the space assigned by malloc() is overrun.
See Also
free(), realloc(), calloc(), ANSI C 4.10.3.3, POSIX.1 8.1
MPE/iX 5.0 Documentation