GCC pack/align compatibility
I havent used Linux much (as yet), but had seen talk about problems with data alignment within structs (where many compilers force alignment to 2 or 4 byte on 'int' etc..).
I have a project written on a MS OS using VC++6 which has pack(1) to save space
on large data structures.
I want to offload some number crunching on a simulation onto a cluster of additional PC class machines (likely to be Linux based to save $$$) and would like to have to do only minor changes to the data structures (and share the common struct definition files if possible).
Is the Pack/Align a problem only if the program is intentionally written to be platform independant??? Ive done some looking at the cloud of compiler parameters that GCC has and I think it indicates that it can be set to the equivalent of pack(1).
Is this a correct assumption???
All machines will be intel compatible so at least byte order wont be a problem.
I normally write C++ as if it was C, so I also hope that most of the data access routines' source (hash heaps etc..) and UDP comm stuff can also be used without changes (to avoid maintaining parallel source codes ).
Edit - Hmmm, Thread stuff tho, will have to be modified.
--------------------------------------------[size="1"]Ratings are Opinion, not Fact
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement