"M. Warner Losh" <i...@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 - d...@des.no
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to