title: How to allocate aligned memory only using the standard library?
body: <p>I just finished a test as part of a job interview, and one question stumped me, even using Google for reference. I'd like to see what the StackOverflow crew can do with it:</p>
  <blockquote>
  <p>The <code>memset_16aligned</code> function requires a 16-byte aligned pointer passed to it, or it will crash.</p>
  <p>a) How would you allocate 1024 bytes of memory, and align it to a 16 byte boundary?<br />
  b) Free the memory after the <code>memset_16aligned</code> has executed.</p>
  </blockquote>
  <pre><code>{    
     void *mem;
     void *ptr;
  
     // answer a) here
  
     memset_16aligned(ptr, 0, 1024);
  
     // answer b) here    
  }
  </code></pre>