Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Memory allocation techniques
Message-ID: <1988Sep17.211310.8758@utzoo.uucp>
Organization: U of Toronto Zoology
References: <415@marob.MASA.COM>
Date: Sat, 17 Sep 88 21:13:10 GMT

In article <415@marob.MASA.COM> daveh@marob.masa.com (Dave Hammond) writes:
>(1) Why the switch from sbrk() to malloc()?  Speed ?  Portability ?
>    Dependability ?  ...

Unlikely to be speed; probably a combination of portability and dependability.
The former because the interface to sbrk gets strange on machines which have
strange memory structures, while malloc can hide the gory details.  The
latter because it's increasingly common for library functions to use malloc,
which can royally foul up a program that uses sbrk and assumes it has sole
control of it.
-- 
NASA is into artificial        |     Henry Spencer at U of Toronto Zoology
stupidity.  - Jerry Pournelle  | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
