Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!srhqla!demott!kdq From: kdq@demott.COM (Kevin D. Quitt) Newsgroups: comp.lang.c Subject: Re: malloc/free question Message-ID: <199@demott.COM> Date: 2 May 90 03:37:03 GMT References: <15873@phoenix.Princeton.EDU> Reply-To: kdq@demott.COM (Kevin D. Quitt) Organization: DeMott Electronics Co., Van Nuys CA Lines: 22 In article <15873@phoenix.Princeton.EDU> pfalstad@phoenix.Princeton.EDU (Paul John Falstad) writes: > >They do say that their allocator looks for the "first fit," and not the >"best fit;" that is, it looks for the first block instead of the >smallest block in the freelist that will satisfy the request. The >former tends to fragment the list Actually, best fit generally fragments the freelist more than any other technique. About the "best" (simple) way is to do a perfect fit if it's there, and a first fit if there's no perfect fit. kdq -- _ Kevin D. Quitt Manager, Software Development DeMott Electronics Co. VOICE (818) 988-4975 14707 Keswick St. FAX (818) 997-1190 Van Nuys, CA 91405-1266 MODEM (818) 997-4496 Telebit PEP last 34 12 N 118 27 W srhqla!demott!kdq kdq@demott.com 96.37% of the people who use statistics in arguments make them up.