Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uflorida!rex!samsung!munnari.oz.au!sirius.ucs.adelaide.edu.au!levels!ccdn From: CCDN@levels.sait.edu.au (david newall) Newsgroups: comp.lang.c Subject: Re: malloc/free question Message-ID: <14658@levels.sait.edu.au> Date: 4 May 90 16:40:58 GMT References: <2638831C.728C@telly.on.ca> <271@caslon.cs.arizona.edu> <14320@levels.sait.edu.au> <15873@phoenix.Princeton.EDU> Organization: Sth Australian Inst of Technology Lines: 17 pfalstad@phoenix.Princeton.EDU (Paul John Falstad) writes: > They do say that their allocator looks for the "first fit," and not the > "best fit;" I believe their algorithm would be best described as "next fit" and not "first fit". Their algorithm allocates the next fit from the last block allocated or deallocated. A "first fit" allocater, IMHO, should allocate from the "start" every time. This might not be very time efficient, but I observe that it doesn't suffer from too much fragmentation. At least, it doesn't for me. David Newall Phone: +61 8 343 3160 Unix Systems Programmer Fax: +61 8 349 6939 Academic Computing Service E-mail: ccdn@levels.sait.oz.au SA Institute of Technology Post: The Levels, South Australia, 5095