lkml.org 
[lkml]   [2010]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [BUG] SLOB breaks Crypto
From
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.


\
 
 \ /
  Last update: 2010-05-19 21:59    [W:1.379 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site