Re: svn commit: r292809 - head/lib/libc/stdio

2016-01-04 Thread Warner Losh
Be my guest to implement these things. I don't think it matters much, and adds a lot of complexity to avoid a single roundup call. And if we have more-strict alignment for glue than ALIGNBYTES, we're already doomed. We don't do that today. Warner On Tue, Dec 29, 2015 at 3:51 PM, Ian Lepore

Re: svn commit: r292809 - head/lib/libc/stdio

2015-12-29 Thread Ian Lepore
On Tue, 2015-12-29 at 11:37 -0800, John Baldwin wrote: > On Monday, December 28, 2015 01:01:26 PM Warner Losh wrote: > > I'll look at that, but I don't think posix_memalign is the right > > way to go. > > The alignment of FILE is more strict than posix_memalign will > > return. Ian's > > idea of

Re: svn commit: r292809 - head/lib/libc/stdio

2015-12-29 Thread John Baldwin
On Tuesday, December 29, 2015 03:51:29 PM Ian Lepore wrote: > On Tue, 2015-12-29 at 11:37 -0800, John Baldwin wrote: > > On Monday, December 28, 2015 01:01:26 PM Warner Losh wrote: > > > I'll look at that, but I don't think posix_memalign is the right > > > way to go. > > > The alignment of FILE

Re: svn commit: r292809 - head/lib/libc/stdio

2015-12-29 Thread Bruce Evans
On Tue, 29 Dec 2015, John Baldwin wrote: On Monday, December 28, 2015 01:01:26 PM Warner Losh wrote: I'll look at that, but I don't think posix_memalign is the right way to go. The alignment of FILE is more strict than posix_memalign will return. Ian's idea of __alignof__ is the way to go. We

Re: svn commit: r292809 - head/lib/libc/stdio

2015-12-29 Thread John Baldwin
On Monday, December 28, 2015 01:01:26 PM Warner Losh wrote: > I'll look at that, but I don't think posix_memalign is the right way to go. > The alignment of FILE is more strict than posix_memalign will return. Ian's > idea of __alignof__ is the way to go. We allocate them in one block on > purpose

Re: svn commit: r292809 - head/lib/libc/stdio

2015-12-29 Thread Bruce Evans
On Wed, 30 Dec 2015, David Chisnall wrote: On 30 Dec 2015, at 00:48, Bruce Evans wrote: - C++ apparently spells this as both _Alignof() and alignof() after 2011/03 This is not correct. C++ spells it alignof. C spells it _Alignof, unless you include , in which case

Re: svn commit: r292809 - head/lib/libc/stdio

2015-12-29 Thread David Chisnall
On 30 Dec 2015, at 00:48, Bruce Evans wrote: > > - C++ apparently spells this as both _Alignof() and alignof() after 2011/03 This is not correct. C++ spells it alignof. C spells it _Alignof, unless you include , in which case C spells it alignof and defines _

Re: svn commit: r292809 - head/lib/libc/stdio

2015-12-28 Thread John Baldwin
On Sunday, December 27, 2015 11:04:12 PM Warner Losh wrote: > Author: imp > Date: Sun Dec 27 23:04:11 2015 > New Revision: 292809 > URL: https://svnweb.freebsd.org/changeset/base/292809 > > Log: > The FILE structure has a mbstate_t in it. This structure needs to be > aligned on a int64_t

Re: svn commit: r292809 - head/lib/libc/stdio

2015-12-28 Thread Warner Losh
I'll look at that, but I don't think posix_memalign is the right way to go. The alignment of FILE is more strict than posix_memalign will return. Ian's idea of __alignof__ is the way to go. We allocate them in one block on purpose for performance, and posix_memalign would be a one at a time

svn commit: r292809 - head/lib/libc/stdio

2015-12-27 Thread Warner Losh
Author: imp Date: Sun Dec 27 23:04:11 2015 New Revision: 292809 URL: https://svnweb.freebsd.org/changeset/base/292809 Log: The FILE structure has a mbstate_t in it. This structure needs to be aligned on a int64_t boundary. However, when we allocate the array of these structures, we use