Shahar Ben-David

Struct members memory order

Discussion created by Shahar Ben-David on Mar 9, 2009
Latest reply on Mar 9, 2009 by CompilerGuru



Is there a way to tell the linker to place struct members in memory in the order they where defined in the code? This will place the struct members in consecutive order as written in the struct definition.

The reason for this is to use the memcpy function to copy an entire memory segment ("as is") into the struct.