Storage allocators
John Quarterman
jsq at ut-sally.UUCP
Wed Aug 7 08:45:14 AEST 1985
----------------------------------------------------------------------
Date: Tue, 6 Aug 85 01:11:53 PDT
From: seismo!sun!guy (Guy Harris)
To: cbosgd!std-c, ut-sally!std-unix
Subject: Re: Storage allocators
> Unix has long had an undocumented routine alloca(), which allocates
> storage off the stack. This storage then goes away when the function
> returns.
*Some* UNIXes have had it. It was a PWB/UNIX invention, and wiggled its way
into 4.xBSD; I don't remember it being in V7.
> ...since C supports variables on the stack, so I doubt that there are many
> machines which can't do alloca(), and for Unix, it comes down to
> documenting something that has been there for a long time.
If you said "I know that there are no machines which can't do 'alloca'", I'd
be more in favor of this proposal. C supports variables on the stack, but
that merely requires that you can allocate a stack frame on procedure entry,
not that you can extend a stack frame during the execution of a procedure.
I would not be willing to say that all machines with C implementations can
do that.
>From the standpoint of UNIX, it's not clear that it's something that's been
there for a long time in *all* UNIXes.
Guy Harris
------------------------------
Discussions-Of: UNIX standards, particularly the IEEE P1003 draft standard.
Submissions-To: ut-sally!std-unix or std-unix at ut-sally.ARPA
Comments-To: ut-sally!std-unix-request or std-unix-request at ut-sally.ARPA
UUCP-Routes: {ihnp4,seismo,harvard,gatech}!ut-sally!std-unix
Archives-In: ~ftp/pub/mod.std.unix on ut-sally.ARPA (soon sally.UTEXAS.EDU)
More information about the Mod.std.unix
mailing list