Messages in this thread | | | Date | Wed, 19 May 2010 12:56:30 -0700 (PDT) | Subject | Re: [BUG] SLOB breaks Crypto | From | David Miller <> |
| |
From: Christoph Lameter <cl@linux.com> Date: Wed, 19 May 2010 10:19:33 -0500 (CDT)
> The assumptions are not arbitrary. It is reasonable to assume that > structures managed by the slab allocators may contain long long variables > and that therefore a unsigned long long alignment is required by the > allocator. It is the *compiler* who tells us that long long needs to be > aligned at double word boundaries. If an arch does not require long long > alignment on double word boundaries then the *compiler* should tell us > that and then the allocators will align on word boundaries.
That is a good point.
So really, __alignof__(unsigned long long) is technically always right. Because it should evaluate to "4" on x86-32, for example.
| |