Manual pages › BSD C library (3B)
alloca(3B)
memory allocator
From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.
NAME
alloca - memory allocator
SYNOPSIS
cc [ flag... ] file ... -lucb #include <alloca.h> char *alloca(size) int size;
DESCRIPTION
alloca allocates size bytes of space in the stack frame of the caller, and returns a pointer to the allocated block. This temporary space is automatically freed when the caller returns. Note: if the allocated block is beyond the current stack limit, the resulting behavior is undefined.
SEE ALSO
sigstack(3), sigvec(3). csh(1) in the User's Reference Manual. ld(1), brk(2), getrlimit(2), calloc(3), and malloc(3) in the Programmer's Reference Manual. Stephenson, C.J., Fast Fits, in Proceedings of the ACM 9th Symposium on Operating Sys- tems, SIGOPS Operating Systems Review, vol. 17, no. 5, October 1983. Core Wars, in Scientific American, May 1984.
NOTES
alloca is machine-, compiler-, and most of all, system-dependent. Its use is strongly discouraged.