Original Post
My compiler has four settings for memory alignment (8, 16, 32, 64 bits). Which one is preferred, 32 or 64?
Thanks,
Micah
quote:
Original post by Serge K
You should always use largest size for memory alignment.
In case of VC6 - 8 byte is enough (it has no intrinsic datatypes large then 64bit).
For Intel C++ compiler - 16 bytes (if you want to use SSE).
If you think, that because of the alignment you wasting too much memory - just rearrange members in the critical structures & classes.
quote:
Original post by NuffSaid
I thought that the current crop of processors were 32 bit, therefore the optimum alignment would be 4 bytes. 8 bytes would only be necessary if you were intending to have your programs ported to a 64 bit OS (sometime in the future).
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more