Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!mit-eddie!husc6!mailrus!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.UUCP Newsgroups: comp.unix.wizards Subject: Re: back to the (ivory) tower Message-ID: <8017@brl-smoke.ARPA> Date: 4 Jun 88 22:10:49 GMT References: <16018@brl-adm.ARPA> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 In article <16018@brl-adm.ARPA> ted%nmsu.csnet@relay.cs.net writes: >What is the opinion of the masses? Is alloca really such a problem >across differing architectures? Is it really that useful? Yes, alloca() simply cannot be reasonably implemented on a large class of C implementations (notably, those with linked procedure context frames instead of a single stack). I published a public- domain "mostly portable" version that works on all stack-based implementations, but it uses malloc() for the allocation, not the stack. Many stack-based implementations do not supply much stack space. In fact, Gnu seems to provide my alloca() for use on systems that don't come with their own. For a limited class of applications, alloca() can be useful. However, I don't use it myself. My applications all use a more disciplined approach to memory allocation.