title: Why is the use of alloca() not considered good practice?
body: <p><code>alloca()</code> allocates memory on the stack rather than on the heap, as in the case of <code>malloc()</code>. So, when I return from the routine the memory is freed. So, actually this solves my problem of freeing up dynamically allocated memory. Freeing of memory allocated through <code>malloc()</code> is a major headache and if somehow missed leads to all sorts of memory problems.</p>
  
  <p>Why is the use of <code>alloca()</code> discouraged in spite of the above features?</p>