On Fri, Jul 27, 2018 at 9:44 AM, Florian Weimer <fweimer(a)redhat.com> wrote:
On 07/27/2018 03:33 PM, John Reiser wrote:The key principle is that
sizeof(foo) must be the stride of an array of foo,
and the array must guarantee alignment of each element in the array.
>
Why do you think that? If some documentation claims this is the case for
individual objects, we need to fix it.
struct sizes *do* have this property - they are rounded up so that arrays
have the correct alignment.
But that certainly doesn't imply that malloc(7) is allowed to give you
unaligned memory.
Owen