Subject: Re: 8 octets aligned data with malloc ?
To: Manuel BOUYER <bouyer@antioche.lip6.fr>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 10/15/1997 06:53:46
At 11:18 PM 10/14/97 +0200, Manuel BOUYER wrote:
>
>Hi,
>I need to malloc some memory space that should be aligned to 8 bytes.
>Is there a better way to do this than:
>  p = (malloc(size + 0x7) +0x7) & 0x7;
> ?
>
>This is for a chip that needs 64bits aligned adresses for DMA.

Since quad_t is supported and may require quad alignment, malloc must
return memory that's quadword aligned.
-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt.html
Nashua, NH                Disclaimer: I disavow all knowledge of this message