|
|
|
|
|
by a1369209993
766 days ago
|
|
> in fact you need to work quite hard to allocate a structure with a pointer that isn't at least 4 byte aligned (i386), or 8 byte aligned (x64). Well, no, actually; it's: p = malloc(size+1)+1;
It's just quite implausible that you'd do that by accident. |
|
The actual danger is in reinterpreting the pointers, or thereof some arbitrary chunk of memory, to a type that doesn't necessarily satisfy the alignment requirements for that given memory address.