What is alloca()? [Generated by bison from flex]
T. William Wells
bill at twwells.com
Wed Sep 27 05:05:16 AEST 1989
In article <1989Sep24.050214.13898 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
: It's a nonstandard botch (originating in some poorly-designed ancient Unix
: systems) that some of the Gnoids are really fond of. The theory is that
: it's malloc() except that the storage automatically goes away when you leave
: the function it was called in. This is more than a little difficult to
: implement on some machines...
The version of gas (Gnu assembler) I have uses alloca in two places;
neither of which is a particularly good place for it and one of which
is downright stupid. That latter is alloca'ing an array which can
never be over four bytes long. I found these because I won't use code
that uses alloca. And maybe when gas actually works on my system (its
opcode tables are incomplete), I'll actually use it.
---
Bill { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com
More information about the Comp.lang.c
mailing list