Path: utzoo!attcan!utgpu!watmath!att!bellcore!rutgers!tut.cis.ohio-state.edu!ucbvax!agate!shelby!polya!modesty!ramani From: ramani@modesty.Stanford.EDU (Ramani Pichumani) Newsgroups: comp.sys.mips Subject: alloca(3C) Message-ID: <11601@polya.Stanford.EDU> Date: 31 Aug 89 07:13:50 GMT Sender: USENET News System Reply-To: ramani@modesty.Stanford.EDU (Ramani Pichumani) Organization: Stanford University Computer Science Department Lines: 20 Does anyone have a real working version of alloca(3C) for the MIPS compiler? I'm using a Silicon Graphics 4D R2000 box which doesn't come with alloca() in its library. Doug Gwen's semi-portable version won't do for my application since I truly need to extend the stack. I'm aware that the use of alloca() is discouraged because it is compiler and machine dependent. Yet all the Berkeley UNIX machines I've used seem to have it. And besides, allocating memory locally seems like a very convienent way of cleaning up garbage that is local to a procedure. Furthermore, dynamically allocated local memory can ease fragmentation problems with the heap. I've been told by one source that alloca() can't be truly implemented on a MIPS compiler because of the way it handles it's stacks. I hope this isn't the case. Ramani Pichumani Tel: (415) 723-2902 or 723-2437 Department of Computer Science Fax: (415) 725-7411 Margaret Jacks Hall, Room 308 email: ramani@patience.stanford.edu Stanford, CA 94305 USA uunet!patience.stanford.edu!ramani