alloca() portability

Karl Heuer karl at ima.isc.com
Mon Nov 5 17:08:49 AEST 1990


In article <499 at taumet.com> steve at taumet.com (Stephen Clamage) writes:
>russ at 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 at ima.isc.com or uunet!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list