[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Struct packing/alignment problems
From: |
Leon Woestenberg |
Subject: |
Re: [lwip-users] Struct packing/alignment problems |
Date: |
Tue, 04 May 2004 19:28:01 +0200 |
User-agent: |
Mozilla Thunderbird 0.5 (Windows/20040207) |
Hello all,
Timmy Brolin wrote:
Why would they be put on 4 byte boundaries? The natural boundary of u16s
is 2 bytes, not 4 bytes. Putting a u16 on a 4 byte boundary changes
nothing.
>
OK, we all seem to agree on the fact that types should always be aligned
on their natural alignment boundaries.
The real question is whether the compiler is allowed to add *extra*
padding (for performance reasons or whatever). If a compiler is free
to add extra padding (i.e. other than for alignment reasons) we need
to keep it from doing this (through packing).
Can we give live examples of extranous padding?
I remember the packing stuff being added for *some* reason, although
I cannot remember the specific compiler or platform.
Regards,
Leon.
- Re: [lwip-users] Struct packing/alignment problems, Timmy Brolin, 2004/05/01
- Re: [lwip-users] Struct packing/alignment problems, Jani Monoses, 2004/05/03
- Re: [lwip-users] Struct packing/alignment problems, Timmy Brolin, 2004/05/03
- Re: [lwip-users] Struct packing/alignment problems, Jani Monoses, 2004/05/04
- Re: [lwip-users] Struct packing/alignment problems, K.J. Mansley, 2004/05/04
- Re: [lwip-users] Struct packing/alignment problems, d99tibr, 2004/05/04
- Re: [lwip-users] Struct packing/alignment problems, Jani Monoses, 2004/05/04
- Re: [lwip-users] Struct packing/alignment problems, Timmy Brolin, 2004/05/04
- Re: [lwip-users] Struct packing/alignment problems,
Leon Woestenberg <=
- Re: [lwip-users] Struct packing/alignment problems, Timmy Brolin, 2004/05/04
- Re: [lwip-users] Struct packing/alignment problems, Leon Woestenberg, 2004/05/04
- Re: [lwip-users] Struct packing/alignment problems, Timmy Brolin, 2004/05/04
- Re: [lwip-users] Struct packing/alignment problems, Jani Monoses, 2004/05/05
- Re: [lwip-users] Struct packing/alignment problems, Jani Monoses, 2004/05/05
- Re: [lwip-users] Struct packing/alignment problems, Timmy Brolin, 2004/05/05
- Re: [lwip-users] Struct packing/alignment problems, K.J. Mansley, 2004/05/04
- Re: [lwip-users] Struct packing/alignment problems, Timmy Brolin, 2004/05/04
- Re: [lwip-users] Struct packing/alignment problems, Kieran Mansley, 2004/05/04
- Re: [lwip-users] Struct packing/alignment problems, Leon Woestenberg, 2004/05/04