Comment 11 for bug 436758

On Thu, Oct 22, 2009 at 3:57 PM, Scott James Remnant <email address hidden>wrote:

> Shouldn't it be something more like:
> __allocof__ (struct) * ((sizeof (struct) - 1) / __allocof__ (struct) +
> 1)
> Not entirely sure how __allocof__ works?
I used __alignof__. While I had some trouble finding docs, it appears to
work fairly simply. When given a type, it will return the number of bytes of
padding needed to reach proper memory alignment. For example, the
NihAllocCtx struct has sizeof 20 on my system, and __alignof__(NihAllicCtx)
returns 4. In theory on x86 it would return 0 and hopefully the compiler
will be smart enough to optimize it out.

> We'll need you to follow
> for this patch
I will do this immediately.