Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!vsi1!daver!mfgfoc!exodus From: exodus@mfgfoc.UUCP (Greg Onufer) Newsgroups: comp.lang.c Subject: Re: alloca wars Message-ID: <394@mfgfoc.UUCP> Date: 5 Aug 88 16:52:18 GMT References: <62721@sun.uucp> Organization: FOCUS Semiconductor Sys., Sunnyvale, CA Lines: 26 From article <62721@sun.uucp>, by swilson%thetone@Sun.COM (Scott Wilson): > 1.) Code that, in general, makes use of features that are less available > than others is, in general, less portable. I don't feel alloca is such a big issue in portability... consider the GNU code. Makes extensive use of alloca. Works on quite a few machines too, I'd say. > 2.) Alloca is less available than malloc/free. On a M68k with a decent OS, alloca is not more than a few lines of assembly code, correct? (Judging by the size of the GNU assembly alloca)... If one needs alloca and it is not available, why not write a quick alloca? If the machine architecture or OS is braindamaged, then one would have to program around it. GNU does that also. > 3.) Therefore, all other things equal, code that uses alloca is less > portable than code that doesn't. Not if the programmer cares that extra little bit. > Does this make sense? Does it? -Greg -- Greg Onufer GEnie: G.ONUFER University of the Pacific UUCP: -= Focus Semiconductor =- exodus@mfgfoc ...!sun!daver!mfgfoc!exodus (and postmaster/exodus@uop.edu) AT&T: 415-965-0604 USMAIL: #901 1929 Crisanto Ave, Mtn View, CA 94040