Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
pragma pack(1) on struct contains object
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Ian Collins, post: 3588007"] Most, if not all processors prefer types to be aligned to their natural boundary, say 4 bytes for an int. When an int value is not aligned on a 4 byte boundary, the processor may require one or two extra bus cycles to read the value form memory. Some processors (Sparc for example) *require* types to be aligned to their natural boundary. They will generate a hardware trap it you attempt a misaligned access. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
pragma pack(1) on struct contains object
Top