From: Dan A. <da...@gm...> - 2004-02-09 06:03:53
|
On Sun, Feb 08, 2004 at 04:55:07PM -0800, Ballard Jonathan wrote: > I was curious about the intention of the packed data structures. There are > many of them. I wondered if they are required to be packed or if they just > save space being packed. Packed structures are great at size but at the > cost of speed being non-aligned. If there is no requirement for them to be > packed, then would an option that optimizes for speed be pratical? We are using two different compilers to access the data, packing of 1 prevents problems regarding field offsets. > About the "long long," it is unfortunate that such C syntax is not > standardized. I imagine it is one of the reasons why Intel and other > manufacturers hold back their 64 bit processors. That is one of the reasons > why a header file is usually made to standardized the syntax at the project > level. Most variables within functions do not need a project level syntax, > yet it is helpful. The data structures, however, need a standard. An > example: > > In the project level header: > > #define coLinuxNatural8bit unsigned char > #define coLinuxNatural16bit unsigned short > #define coLinuxNatural32bit unsigned long > #define coLinuxNatural64bit unsigned long long When coLinux gets ported to other architectures it may need what you mention above, but as long as the two compilers we are using are of two compatible GNU gcc versions, there shouldn't be any problem with C types. -- Dan Aloni da...@gm... |