malloc/free question

Kevin D. Quitt kdq at demott.COM
Wed May 2 13:37:03 AEST 1990


In article <15873 at phoenix.Princeton.EDU> pfalstad at 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 at demott.com

 96.37% of the people who use statistics in arguments make them up.



More information about the Comp.lang.c mailing list