[comp.sys.misc] alloca

net@tub.UUCP (Oliver Laumann) (06/12/90)

Does anybody know whether there exists a version of alloca() for MIPS CPUs?
I mean the `real thing', i.e. an alloca() that actually advances the stack
pointer, not a quiche-eater alloca() that uses malloc() and free().

I'm in the process of porting a piece of software that requires alloca()
(I'm sure at this point you have already guessed what software package
I'm speaking about :-) to a Sony workstation which has a MIPS R3000 CPU.
Unfortunately, the version of alloca() in Sony's libc.a looks like it's
derived from the semi-portable alloca() written by Doug Gwyn (it uses
malloc/free).

Thanks,
--
Oliver Laumann            net@tub.cs.tu-berlin.de            net@tub.UUCP

meissner@osf.org (Michael Meissner) (06/14/90)

In article <1371@tub.UUCP> net@tub.UUCP (Oliver Laumann) writes:

| Does anybody know whether there exists a version of alloca() for MIPS CPUs?
| I mean the `real thing', i.e. an alloca() that actually advances the stack
| pointer, not a quiche-eater alloca() that uses malloc() and free().
| 
| I'm in the process of porting a piece of software that requires alloca()
| (I'm sure at this point you have already guessed what software package
| I'm speaking about :-) to a Sony workstation which has a MIPS R3000 CPU.
| Unfortunately, the version of alloca() in Sony's libc.a looks like it's
| derived from the semi-portable alloca() written by Doug Gwyn (it uses
| malloc/free).

You could always use GNU C, and #define alloca to be __builtin_alloca
(many programs already have the necessary magic in them).  Though of
course, if you want to debug with the released GCC, you are currently
up a creek.
--
Michael Meissner	email: meissner@osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA

Catproof is an oxymoron, Childproof is nearly so