Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ alloca(3) — Atari System V ue12

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sigstack(3)

sigvec(3)

csh(1)

ld(1)

brk(2)

getrlimit(2)

calloc(3)

malloc(3)





   alloca(3)               (BSD Compatibility Package)               alloca(3)


   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 Systems, 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.  Within the M88000 family of
         processors, the programmer is responsible for freeing the allocated
         block because the M88000 family of processors does not set up and
         free stack frames upon entry and exit from a function.  Also, local
         variables on the stack may be improperly accessed after allocation.
         Therefore, its use on the M88000 family of processors is extremely
         discouraged.















   7/91                                                                 Page 1





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026