Memory allocation techniques

Doug Gwyn gwyn at smoke.ARPA
Sat Sep 17 01:13:43 AEST 1988


In article <415 at marob.MASA.COM> daveh at 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.



More information about the Comp.lang.c mailing list