...
Type | Alignment |
|---|---|
| 1 byte aligned |
| 2 byte aligned |
| 4 byte aligned |
| 4 byte aligned |
| 8 byte on Windows, 4 byte on Linux |
Compliant Solution
-Make specific functions (avoid use of void*)-Always use strictest alignment type for arbitrary pointers.
| Code Block | ||
|---|---|---|
| ||
int *loop_ptr;
int * int_ptr;
int *loopFunction(int *v_pointer)
{ return v_pointer; }
int_ptr = loopFunction(loop_ptr);
|
...