title: What does posix_memalign/memalign do
body: <p>I'm trying to understand what functions <code>memalign()</code> and <code>posix_memalign()</code> do. Reading the available documentation didn't help. </p>
  
  <p>Can someone help me understand how it works and what is it used for? Or, perhaps provide a usage example?</p>
  
  <p>I'm trying to understand how linux memory works, I need to write my own simple memory pool (low-fragmentation heap).</p>