Hi, On Wed, Apr 13, 2011 at 2:26 PM, Andrew Bell <andrew.bell.ia@xxxxxxxxx> wrote: > > malloc() will return memory on a boundary suitable for any type. If > some types must be, say, 8-byte aligned, malloc will return memory > that is 8-byte aligned. This of course satisfies types that are > 4-byte, 2-byte and non-aligned. > > Your example code will end up breaking on some systems. > Even if it doesn't break it will likely incur a performance penalty from unaligned accesses, right? > -- > Andrew Bell > andrew.bell.ia@xxxxxxxxx >