Path: utzoo!utgpu!watserv1!watmath!att!ima!ima.isc.com From: karl@ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: alloca() portability Keywords: portability, alloca Message-ID: <5237@ima.ima.isc.com> Date: 5 Nov 90 06:08:49 GMT References: <9032@ncar.ucar.edu> <499@taumet.com> Sender: karl@ima.ima.isc.com Reply-To: karl@ima.isc.com (Karl Heuer) Distribution: na Organization: Interactive Systems Lines: 14 Supersedes: <1990Nov04.213253.4801@dirtydog.ima.isc.com> In article <499@taumet.com> steve@taumet.com (Stephen Clamage) writes: >russ@groucho.ucar.edu (Russ Rew) writes: >>[Are there any real implementations where Doug Gwyn's alloca() fails?] >There is more to it than the target machine. Some compilers get a >performance win by omitting frame pointers ... Irrelevant. The Gwyn alloca() doesn't use the algorithm of moving the frame pointer and jumping back to the caller; it's written in C, and I've used it on systems where the assembly version can't work for the reasons stated. In response to the original question: it might conceivably fail on a system that does strict pointer checking (Sabre). Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint