alloca wars
Stan Friesen
sarima at gryphon.CTS.COM
Mon Aug 8 07:50:21 AEST 1988
In article <697 at goofy.megatest.UUCP> djones at megatest.UUCP (Dave Jones) writes:
>From article <696 at ns.UUCP>, by ddb at ns.UUCP (David Dyer-Bennet):
>> If you don't have that, what advantage is there over malloc or
>> any of the standard allocation routines?
>
>Speed. The malloc() on in Sun3 OS, for example, is incredibly slow
>after a few thousand blocks have been allocated.
Indeed, and not just on Suns either. A similar thing happened to
me on a Convergent. In fact it eventually got sooo slow that our customers
complained! (Luckily the large number of allocations was unnecessary, the
code was not freeing a message block, so it was easy to fix by just adding
a free() after the message was displayed. But still a 10-20 fold increase in
speed *just* by adding one free!!)
--
Sarima Cardolandion sarima at gryphon.CTS.COM
aka Stanley Friesen rutgers!marque!gryphon!sarima
Sherman Oaks, CA
More information about the Comp.lang.c
mailing list