(BSD System Compatibility)

alloca(3bsd)


alloca -- (BSD) memory allocator

Synopsis

   /usr/ucb/cc [flag . . . ] file . . .
   

#include <alloca.h>

char *alloca(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.

References

brk(2), csh(1), getrlimit(2), ld(1), malloc(3C), sigstack(3bsd), sigvec(3bsd)

Stephenson, C.J., Fast Fits, in Proceedings of the ACM 9th Symposium on Operating Systems, SIGOPS Operating Systems Review, vol. 17, no. 5, October 1983

Core Wars, in Scientific American, May 1984

Notices

alloca is machine-, compiler-, and most of all, system-dependent. Its use is strongly discouraged.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004