evilness of alloca!

Root Boy Jim rbj at dsys.icst.nbs.gov
Wed Apr 26 11:16:23 AEST 1989


? From: Doug Gwyn <gwyn at smoke.brl.mil>
? Date: 23 Apr 89 01:20:42 GMT

? In article <19255 at adm.BRL.MIL> Leisner.Henr at xerox.com (Marty) writes:
? >I'm debating whether to start using alloca in some of my applications.

? We just went over that.  alloca() is not available on some systems for
? good and sufficient reasons.  I would think that any sane programmer
? would avoid it like the plague.

So they get your version. This seems to be a religious issue. It really
depends on your outlook. However, I would caution people to use it
only if they know *why* they are using it. Using alloca where malloc/free
would work as well is probably not a good idea. Likewise, bending over
backwards to force a problem into the malloc/free paradigm when it is
expressed more naturally in terms of alloca is merely being pedantic.

	Root Boy Jim is what I am
	Are you what you are or what?



More information about the Comp.unix.wizards mailing list