On Thu, Oct 22, 2009 at 3:57 PM, Scott James Remnant <[email protected]>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 > http://upstart.ubuntu.com/wiki/CopyrightAssignment for this patch > > I will do this immediately. katre -- upstart doesn't boot on sparc https://bugs.launchpad.net/bugs/436758 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
