Subject: Re: 8 octets aligned data with malloc ?
To: None <ignatios@cs.uni-bonn.de>
From: Gordon W. Ross <gwr@mc.com>
List: tech-kern
Date: 10/15/1997 11:09:43
> From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
> Date: Wed, 15 Oct 1997 10:06:44 +0200 (MET DST)

> > 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;

The "contract" of malloc is to "Allocate space that is suitably
aligned for the largest type of access."  (Right?)

If so, then malloc should align to 8-bytes on that machine.

Gordon