title: Why sizeof() differs on 64bit cpu?
body: <p>Consider following example:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;inttypes.h&gt;
  
  struct A {
          uint32_t i1;
          uint32_t i2;
          uint32_t i3;
          uint64_t i4;
          uint32_t i5;
          uint32_t i6;
          uint32_t i7;
          uint64_t i8;
          uint32_t i9;
  };
  
  struct B {
          uint32_t i1;
          uint32_t i2;
          uint32_t i3;
          uint32_t i4;
          uint32_t i5;
          uint32_t i6;
          uint32_t i7;
          uint64_t i8;
          uint64_t i9;
  };
  
  int
  main()
  {
          struct A a;
          struct B b;
  
          printf("sizeof(a) = %u, sizeof(b) = %u\n", sizeof(a), sizeof(b));
  
          return 0;
  }
  </code></pre>
  
  <p>Output is:</p>
  
  <pre><code>$ ./t2 
  sizeof(a) = 56, sizeof(b) = 48
  $ 
  </code></pre>
  
  <p>Why are they differ on 64bit machine ? On 32 bit platform results are the same:</p>
  
  <pre><code>$ ./t2
  sizeof(a) = 44, sizeof(b) = 44
  </code></pre>