lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-users] Struct packing/alignment problems


From: Chris Jones
Subject: RE: [lwip-users] Struct packing/alignment problems
Date: Wed, 5 May 2004 07:49:24 -0400

>This would seem to be a much more serious, and difficult problem to
>solve than the "packed" debate.  Systems with non-8-bit-bytes (they
>still have byte addressing by definition btw: it's just the byte is not
>8 bits) have been largely ignored in development as it's hard to find a
>solution that is pleasing to both.

Actually, a 'byte' is always 8 bits.
It is the 'char' type that can be defined to be multiple bytes on a 
particular platform.

Relying on char to have a size equal to one byte is poor design.
A better approach is to manage memory using the default word size.

Many DSPs do NOT have byte addressing. Incrementing an address on these 
platforms will advace to the next word.

-Chris






reply via email to

[Prev in Thread] Current Thread [Next in Thread]