Newsgroups: comp.unix.aix Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!mit-eddie!bloom-beacon!world!madd From: madd@world.std.com (jim frost) Subject: Re: changing the console; alloca missing from 9021? Message-ID: <1990Aug7.022852.21051@world.std.com> Organization: Saber Software References: <61875@bu.edu.bu.edu> <1990Aug3.170532.11038@ibmpa> <3048@awdprime.UUCP> <3828@auspex.auspex.com> Date: Tue, 7 Aug 90 02:28:52 GMT guy@auspex.auspex.com (Guy Harris) writes: >Yes, but Sun (for SPARC) and, I think, MIPS hide the help they give the >compiler (a #define, rather than a #pragma, in Sun's case) in an include >file ; On the MIPS architecture alloca is a bitch to do -- a stack frame *cannot* change size. The DECstation doesn't even have a real alloca, but instead uses malloc. Calls to alloca with a zero argument free everything allocated with alloca. I have a similar function that I sometimes use on machines that have a broken alloca. I haven't looked at the MIPS stuff close enough to tell if they do the same as DEC but I wouldn't be at all surprised. It would have been nice for IBM to have hidden the #pragma and it would also have been nice for them to allow it at any place outside of a function. Unfortunately they didn't, too bad, but in my experience this won't be the worst problem you come across when porting code written by people who think alloca is portable. Happy hacking, jim frost saber software jimf@saber.com