On Wed, May 26, 2010 at 02:59, Geert Uytterhoeven wrote:
there are two issues. first, the ARCH_SLAB_MINALIGN define is used to
align dynamically packed data on the stack. the alignment of kmalloc
has no bearing here because things like the env get packed in and then
the ARCH_SLAB_MINALIGN value is manually used to re-align the stack.
second, the define is further used to manually set up alignment of the
data section after it has been mmapped in anonymously and made room
for shared library data. this too has no kmalloc bearing because mmap
sucks things in by grabbing pages manually.
i believe that is correct. FLAT behavior today provides alignment of
either sizeof(unsigned long) or ARCH_SLAB_MINALIGN.
i imagine something like this would work today because everyone
defines it to a constant:
-#ifdef ARCH_SLAB_MINALIGN
+#if defined(ARCH_SLAB_MINALIGN) && ARCH_SLAB_MINALIGN != 0
but this would break if someone tried using gcc sizeof/alignof/etc...
-mike
--