User Tools

Site Tools


struct_implementation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
struct_implementation [2010/05/12 13:57]
zhangvi1
struct_implementation [2010/12/15 15:53] (current)
Line 106: Line 106:
  
 Struct Alignment: Struct Alignment:
-  * Structs are declared as align 8 by llvm-gcc, so a char proceeded by an int takes up 8 bytes (3 unused). char, int, char takes up 12 bytes, however char, char, int uses 8. Also, clang initializes structs using llvm.memcpy align 4.+  * Structs are declared as align 8 by llvm-gcc, but seem to be internally align 4, so a char proceeded by an int takes up 8 bytes (3 unused). char, int, char takes up 12 bytes, however char, char, int uses 8.
  
 =======Instructions To Implement======= =======Instructions To Implement=======
struct_implementation.txt ยท Last modified: 2010/12/15 15:53 (external edit)