Path: utzoo!attcan!uunet!lll-winken!ames!oliveb!apple!desnoyer From: desnoyer@Apple.COM (Peter Desnoyers) Newsgroups: comp.lang.c Subject: Re: Memory Allocation Message-ID: <30501@apple.Apple.COM> Date: 11 May 89 17:02:58 GMT References: <10946@bloom-beacon.MIT.EDU> <12546@ut-emx.UUCP> <467@chem.ucsd.EDU> <4132@ficc.uu.net> Organization: Apple Computer Inc, Cupertino, CA Lines: 16 In article <4132@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: >I have one question about all this... why this need to store the whole of >some randomly-sized chunk of data in a contiguous block of memory? Why not >use something like clists? >-- >Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Because for a simple program (read it in, crunch it, write it out) you can use an allocation scheme that is so simple that it will work the first time. Also, for some data sets the "natural" representation is a contiguous array, rather than linked chunks, and your processing code becomes more complicated when you use a more sophisticated allocation method. In other words, it's a kludge. Unlike many kludges, however, the payoff is in robustness and simplicity. Peter Desnoyers