[lkml]   [2001]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread

Chris Wedgwood writes:
> What kind of packing makes a 32-bit value take 8-bytes on any
> currently supported archicture? The worst-case I can think of is
> 7-bytes in the case of misaligned by 3 (e.g. __attribute__((packed))
> struct blah { char foo[3]; long bar }; sort of thing).

If you have this:

struct {
u32 foo;
void *bar;

"bar" will be at offset 8 on a 64-bit platforms since it must be
aligned on a 64-byte boundary, so what Jes is saying is that for:

struct {
dma_addr_t foo;
void *bar;

the "dma_addr_t" is already consuming 8 bytes of space on 64-bit

David S. Miller

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:57    [W:0.059 / U:4.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site