What is alloca()? [Generated by bison from flex]

Barry Margolin barmar at kulla
Wed Sep 27 09:28:09 AEST 1989


In article <1989Sep25.172824.18692 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>In article <6361 at thor.acc.stolaf.edu> mike at stolaf.edu (Mike Haertel) writes:
>>I think alloca() originated in one of the early VAX BSD's.  My guess
>>would be that it was invented for use implementing Franz Lisp...
>It goes back farther than that.  The first occurrence I'm aware of was in
>PWB circa 1977.

It also exists in Multics, although I don't know whether it was in the
Multics design during the days when Bell Labs was part of the project.
On Multics it is called something like cu_$expand_stack_frame ("cu_$"
is the prefix for the "command utilities" library, which includes lots
of stack-frame-manipulation routines because it contains the
variable-argument routines that are used instead of argv[], and the
generate-call routines that are used in place of exec()).

Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.lang.c mailing list