Subject: Re: 8 octets aligned data with malloc ?
To: Manuel BOUYER <bouyer@antioche.lip6.fr>
From: Curt Sampson <cjs@portal.ca>
List: tech-kern
Date: 10/15/1997 16:50:43
On Wed, 15 Oct 1997, Manuel BOUYER wrote:
> Chris Torek pointed out that the 4.4bsd malloc always return memory aligned
> on the min of ((smaller ^2 > size), pagesize)....
> Well, to be safe, I could also malloc (size+7), this will not loose that much
> memory ...
Well, you'd use twice as much, actually, in the 4.4BSD allocator,
since it actually uses up an aligned block size 2^n large enough
to hold what you're allocating. :-)
cjs
Curt Sampson cjs@portal.ca Info at http://www.portal.ca/
Internet Portal Services, Inc. Through infinite myst, software reverberates
Vancouver, BC (604) 257-9400 In code possess'd of invisible folly.