tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Address alignment



On Saturday 09 January 2010 17:52:52 David Laight wrote:

> You can't use '&' on pointers, and that isn't quite the right expression.
> The one you want is: x = (x + 7) & ~7;
> 
> With a pointer there are varios options, casting to uintptr_t
> is one one the easiest.
> 
>       David
> 
OK thanks, that's what I was looking for.


Home | Main Index | Thread Index | Old Index