Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!cs.utexas.edu!uunet!overload!dillon From: dillon@overload.Berkeley.CA.US (Matthew Dillon) Newsgroups: comp.sys.amiga.programmer Subject: Re: free() in SAS C Message-ID: Date: 7 May 91 20:56:51 GMT References: <1991May02.143148.22732@edb.tih.no> Distribution: comp Organization: Not an Organization Lines: 52 In article mwm@pa.dec.com (Mike (My Watch Has Windows) Meyer) writes: >In article dillon@overload.Berkeley.CA.US (Matthew Dillon) writes: > >If you're doing lots of frees/allocs later on, you'll take a > >performance hit. > > > > > Actually, AllocMem & FreeMem are *faster* than SAS/C's > malloc & free. The only loose is that your system is more > susceptible to fragmentation. > >Matt, > >I did some tests on 1.3, doing lots of small mallocs/frees vs. doing >lots of AllocMem/FreeMems. Malloc/free was _much_ faster. The critical >condition is that you're reusing space, and not getting new space from >the system. If you're not reusing the space, then AllocMem & FreeMem >will be faster. > >If you're going to do a bunch of allocations, then a bunch of frees, a >single AllocEntry (I think that's the name I want) call is probably >fastest. > > -- >Cheeseburger in paradise Mike Meyer >Making the best of every virtue and vice mwm@pa.dec.com >Worth every damn bit of sacrifice decwrl!mwm >To get a cheeseburger in paradise -- Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA