[lkml]   [2001]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: sizeof problem in kernel modules
On Sat, 23 Jun 2001 16:54:20 +0200 (CEST), 
Der Herr Hofrat <> wrote:
>struct { short x; long y; short z; }bad_struct;
>struct { long y; short x; short z; }good_struct;
>I would expect both structs to be 8byte in size , or atleast the same size !
>but good_struct turns out to be 8bytes and bad_struct 12 .

Read any C book about field alignment and padding in structures.
Nothing to do with the kernel or modules.

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:55    [W:0.291 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site