previous | start | next

Linux Example

structure type: s1_t, total size = 20
Member  Address       Size Padding?           typedef struct {     
    c1  0xbfdbbe70      1                      char c1;           
     n  0xbfdbbe74      4                      int n;             
    c2  0xbfdbbe78      1                      char c2;           
     x  0xbfdbbe7c      8                      double x;          
                 sum = 14                    } s1_t;              
                                                               

structure type: s2_t, total size = 16
Member  Address       Size  Padding?          typedef struct { 
     x  0xbfdbbe78     8                       double x;        
     n  0xbfdbbe80     4                       int n;         
    c1  0xbfdbbe84     1                       char c1;       
    c2  0xbfdbbe85     1                       char c2;       
                sum = 14                     } s2_t;          



previous | start | next