Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ alloca(3) — Motorola System V 88k Release 4 Version 4.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1)

ld(1)

brk(2)

getrlimit(2)

calloc(3)

sigstack(3)

sigvec(3)

malloc(3)

alloca(3)  —  LIBRARY FUNCTIONS

NAME

alloca − memory allocator

SYNOPSIS

/usr/ucb/cc  [ flag. . . ] file . . . 
#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. 

NOTES

alloca is machine-, compiler-, and most of all, system-dependent.  Its use is strongly discouraged.  Within the M88 family of processors, the programmer is responsible for freeing the allocated block because the M88 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 M88 family of processors is discouraged. 

SEE ALSO

csh(1), ld(1), brk(2), getrlimit(2), calloc(3), sigstack(3), sigvec(3), malloc(3). 

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.

  —  BSD Compatibility Package

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