[nycbug-talk] 1U Server Recommendations

Kevin Reiter tux
Wed Jan 12 01:52:44 EST 2005


: > In addition, if you have structs with members that are less than 64-bit,
: > they will be aligned on 64-bit boundaries. If you have struct {char
: > a,b,c;}, it'll take 3*32-bit space on ia32, and 3*64bit space on x86_64.
: Mutter, it's too late in the night to do thinking, I'm wrong on this one.
: Struct members are naturally-aligned (i.e. alignment is to the data type's
: own size, chars are not aligned at all, etc) - thus {char a,b,c;} will
: take 3*8 bit of space on any architecture.
:
: However, {char a;int *b;} will be 4+4 bytes on 32-bit and 8+8 bytes on
: 64-bit still.


Can someone hand me a mop and a bucket of warm, soapy water?  My head just
exploded after reading all that...





More information about the talk mailing list