Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!unmvax!indri!paz.geology.wisc.edu!jct
From: jct@geology.wisc.edu (John C. Terranova)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Memory Allocation
Summary: it ain't so
Message-ID: <1989Aug19.215613.1869@geology.wisc.edu>
Date: 19 Aug 89 21:56:13 GMT
References: 
Reply-To: jct@paz.UUCP (John C. Terranova)
Distribution: comp
Organization: UW-Madison Dept of Geology & Geophysics, Madison WI
Lines: 23

In article  pete@titan.rice.edu (Pete Keleher) writes:
>
>I recently ran into a bug that could be easily explained if it were the
>case that 'NewPtr' grabs an entire memory block, even if you only want
>a very small block (<100), thus removing the unused portion of the block
>from any useful activity. Please say it ain't so....

It ain't so.  The smallest number of bytes that the Memory Manager will
allocate for you is 12.  If you request >=12 bytes you will receive
exactly what you ask for (even padded).  There is, of course, an 8 byte
header for every memory block.

There is some other explanation for your bug.

>Pete Keleher						pete@titan.rice.edu

+----------------------------------------------------------------------------+
|  John Terranova  <-- me          disclaimer -->  What the hell do I know?  |
|     jct@ice.geology.wisc.edu  <-- address         I come from Waunakee!    |
+----------------------------------------------------------------------------+
song lyric: We'll drive into the sun and maybe never comin' back.
            We're goin' cruisin'. Do you want to come?  Cruisin'.
            Do you want to come along with me?    -- Gerard, Cruisin'