Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!csus.edu!borland.com!alexande From: alexande@borland.com (Mark Alexander) Newsgroups: comp.os.msdos.programmer Subject: Re: Does TC's farrealloc have a bug? (summary) Message-ID: <1991Jun27.220125.22847@borland.com> Date: 27 Jun 91 22:01:25 GMT References: <1991Jun24.075451.20728@ucthpx.uct.ac.za> Organization: Borland International Lines: 19 In article <1991Jun24.075451.20728@ucthpx.uct.ac.za> gram@uctcs.uucp (Graham Wheeler) writes: >When you use farmalloc/farrealloc, each memory request is separately >allocated from DOS, with a granulation of 16 bytes (1 paragraph), and an >overhead of another 16 bytes per request. This is only half correct. The granularity is indeed 16 bytes, but the overhead for each allocated block is 4 bytes, not 16 bytes. Here's a little table that may help: Requested Actual no. of block size bytes allocated ---------- --------------- 1-12 16 13-28 32 29-44 48 etc. etc. You can verify this by printing the pointers returned by farmalloc(); you'll find that they are all of the form xxxx:0004.