Path: utzoo!attcan!uunet!husc6!cmcl2!nrl-cmf!ames!elroy!gryphon!sarima From: sarima@gryphon.CTS.COM (Stan Friesen) Newsgroups: comp.lang.c Subject: Re: alloca wars Message-ID: <5338@gryphon.CTS.COM> Date: 7 Aug 88 21:50:21 GMT References: <696@ns.UUCP> <697@goofy.megatest.UUCP> Reply-To: sarima@gryphon.CTS.COM (Stan Friesen) Organization: Trailing Edge Technology, Redondo Beach, CA Lines: 18 In article <697@goofy.megatest.UUCP> djones@megatest.UUCP (Dave Jones) writes: >From article <696@ns.UUCP>, by ddb@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@gryphon.CTS.COM aka Stanley Friesen rutgers!marque!gryphon!sarima Sherman Oaks, CA