title: When do we need to use posix_memalign instead of malloc?
body: <p>Seems <code>posix_memalign</code> let you choose a customized <code>alignment</code>,but when is that necessary?</p>
  
  <p><code>malloc</code> has already done the alignment work internally.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The exact reason I ask this is because I see nginx does this,<code>ngx_memalign(NGX_POOL_ALIGNMENT, size, log);</code>,here <code>NGX_POOL_ALIGNMENT</code> is defined as <code>16</code>, <a href="http://nginxs.googlecode.com/svn-history/trunk/src/core/ngx_palloc.c">nginxs.googlecode.com/svn-history/trunk/src/core/ngx_palloc.c</a></p>