Why is there aligment to 8 bytes (and 16 on 64bit systems)? What are reasons for such alignment?
Example:
int* ptr1 = new int;
int* ptr2 = new int;
int* ptr3 = new int;
cout << ptr1 << " " << ptr2 << " " << ptr3 << endl;
cout << ptr2 - ptr1 << endl;
Outputs:
0x15cbc20 0x15cbc40 0x15cbc60
8
Aucun commentaire:
Enregistrer un commentaire