malloc

Allocates an area of memory. These functions are AST-reentrant.

Format

#include  <stdlib.h>

void *malloc  (size_t size);
Function Variants This function also has variants named _malloc32 and _malloc64 for use with 32-bit and 64-bit pointer sizes, respectively. See Section 1.8 for more information on using pointer-size-specific functions.

Argument

size
The total number of bytes to be allocated.

Description

This function allocates a contiguous area of memory whose size, in bytes, is supplied as an argument. The space is not initialized.

Return Values
The address of the first byte, which is aligned on a quadword boundary. 
NULL  Indicates that the function is unable to allocate enough memory. errno is set to ENOMEM. 


Previous Page | Next Page | Table of Contents | Index