Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!amdcad!ames!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Memory allocation techniques Message-ID: <8510@smoke.ARPA> Date: 16 Sep 88 15:13:43 GMT References: <415@marob.MASA.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <415@marob.MASA.COM> daveh@marob.masa.com (Dave Hammond) writes: >(1) Why the switch from sbrk() to malloc()? The most likely reason is that C library routines (and others) may very well call malloc(), which moves the program break, and the application's attempt to totally control everything in the heap runs amok at that point. >(2) Why `waste' smaller chunks? Probably it was an attempt to reduce fragmentation problems.