On Tuesday 02 June 2009 06:36:41 Marek Lindner wrote:
On Tuesday 02 June 2009 03:35:07 Sven Eckelmann wrote:
So my question to marek: Is it really needed to have "struct hna_global_entry" packed in hna.h:57? If not then we should remove it and this problem should be gone. And what is with "struct hna_element".
The first 5 bytes of both structs are used as base for the hash index. If the compiler changes the order or something similar it might not work.
Ok, then it should be safe to force the alignment of the pointers in hna_global_entry. Everything else seems to be much more complicated and doesn't create much cleaner code.
Best regards, Sven