Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!pequod.cso.uiuc.edu!dorner From: dorner@pequod.cso.uiuc.edu (Steve Dorner) Newsgroups: comp.sys.mac.programmer Subject: Re: C source for an alloca() (was Re: alloca for Think C 4.0: here it is) Keywords: alloca Think C Message-ID: <1990Feb12.003454.199@ux1.cso.uiuc.edu> Date: 12 Feb 90 00:34:54 GMT References: <11376@attctc.Dallas.TX.US> <1990Feb10.235911.7601@deimos.cis.ksu.edu> Sender: news@ux1.cso.uiuc.edu (News) Reply-To: dorner@pequod.cso.uiuc.edu (Steve Dorner) Organization: University of Illinois at Urbana-Champaign Lines: 16 In article <1990Feb10.235911.7601@deimos.cis.ksu.edu> jxf@phobos.cis.ksu.edu (Jerry Frain) writes: >Attached is a public domain C source version of alloca. Please use it, >if possible. Let's make kinder, and more portable applications ;-) Hmm. I think I prefer the half-dozen lines of assembler to all this monkeying around, even if the monkeys travel well. Speaking of monkeying around, anyone remember the Byte article several years ago, where someone actually suggested writing an allocator that NEVER reused the first four bytes of any block. He wrote some magic value in the block header, and said, "Gosh, now we can make sure we NEVER have a stale pointer, just by checking for our magic value." He left these little mines fragmenting memory FOREVER. Anyone care to implement THAT little gem for all of us? -- Steve Dorner, U of Illinois Computing Services Office Internet: s-dorner@uiuc.edu UUCP: {convex,uunet}!uiucuxc!dorner