svn commit: r211023 - head/usr.sbin/syslogd
Dag-Erling Smørgrav
des at des.no
Wed Aug 11 09:13:12 UTC 2010
"M. Warner Losh" <imp at bsdimp.com> writes:
> You'll find that a number of structures are potentially already
> allocated with less than required alignment. There's about a dozen
> places in the tree that would start to fail if we did this, or the
> stronger form of __aligned(8). We could add that to the other
> structures, but then we're breaking ABI rules, I think.
__aligned(4) won't affect struct addrinfo since the sockaddr immediately
follows a socklen_t, which is 32 bits wide and has 32-bit alignment. A
sockaddr_* allocated with malloc() will already be aligned, and so will
a sockaddr_* created on the stack. The only problem is sockaddr_un,
because its size is not a multiple of 4, so if you allocate an array of
sockaddr_un, every other element will be misaligned.
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the svn-src-head
mailing list