Temp buffer allocates 16 bytes instead of 4
Closed this issue · 2 comments
francisconroy commented
Please see
Line 154 in 566df8a
The code which swaps the upper and lower dwords allocates char* temp[4]; as the temp buffer.
Each element in the temp array will be as wide as the memory bus.. whereas it only needs to be of length sizeof(double)/2.
bogdanm commented
Not sure what you mean. In the declaration above sizeof(temp)
is 4. When declaring pointers in C, the *
binds to the variable, not to the type.
francisconroy commented
Yes, you are correct. I've done some learning since this..