alloca()

allocate space in the stack frame 

Function


SYNOPSIS

#include <alloca.h>

void *alloca(size_t size);


DESCRIPTION

The alloca() function allocates space in the stack frame of the caller, and returns a pointer to the allocated block. This temporary space is automatically freed when the function from which alloca() is called returns.


PARAMETERS

size 

Specifies the size of the allocated block of memory.


RETURN VALUES

The alloca() function returns a null pointer if there is insufficient memory.


CONFORMANCE

4.4BSD


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

The alloca() function is implemented as a compiler intrinsic. The <alloca.h> header file must be included.


AVAILABILITY

MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
calloc(), free(), malloc(), memalign(), realloc(), valloc()


MKS Toolkit 9.5 Documentation Build 3.