-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Somebody in the thread at some point said: | Am Do 28. August 2008 schrieb Andy Green: |> Somebody in the thread at some point said: |> | Am Do 28. August 2008 schrieb Andy Green: |> |> The problem comes when the guys you need aligned are inside a struct |> |> that does correctly position them at alignment boundary -- relative to |> |> struct start. If the address of the start of the struct is not itself |> |> aligned to the machine word size though, that doesn't help at all. |> |> |> |> So a u32 at +8 from the struct start looks like it follows the rules |> |> great, but if the struct pointer is pointing to 0x1, you are screwed |> |> when you try to dereference that u32 in one 32-bit access at 0x9. |> |> __packed__ is magic get out of jail card for that case. |> | |> | I'd prefer memmove'ing such missaligned structs to an auxiliary buffer |> that's |> | aligned the way it needs to be. Maybe even with a half word padding on |> head |> | and tail. |> |> Why are we interested in your "preferences" about this? | | We are very interested in your answer to your own question, as you are the | only one who can answer it, at least when it comes up to you.
Send patches! - -Andy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAki28TcACgkQOjLpvpq7dMo36wCfZCD7H2fsnwZhvrvBq0PFVHY9 /EAAoJH1pJCExbJN5jBlw2gyjYf5zKp+ =Y3k2 -----END PGP SIGNATURE-----
