Mikael Normark wrote: > I addedd __attrubute__((packed)) to both structures and that made it > all work as supposed to.
Gah, ISHFRTT! At least the use-specifically-sized-types advice is still good. > Adding "packed" to the sample_pkg_t only > saved 2 bytes, What!? That looks like a typo. I think you mean 4 bytes. > adding it to sample_t saved the rest down to 396 so > obviously that structure is poorly aligned. No, it's just that it has more than one sample_t in it, and *each* sample_t has four bytes of padding. 32 * 4 = 128 = the difference between the 396 bytes packed and the 524 bytes unpacked. (SAMPLES_IN_PKG is 32, isn't it?) cheers, DaveK -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/