title: Removing Dynamic Memory Allocation - from a embedded C program
body: <p>I'm trying to port a C library to a embedded platform (Xilinx Microblaze), and the library contains some calls to malloc(), alloc(), calloc() and free().</p>
  
  <p>These functions calls requite additional libraries to be imported in to the embedded platform, and will make the program code larger.</p>
  
  <p>What's the best steps to take to remove dynamic allocation from a C program, and only use static allocation. What are the facts i should find out, what calculations should i make ? Any tips are welcome.</p>
  
  <p>example of malloc call:</p>
  
  <pre><code>   decoder-&gt;sync = malloc(sizeof(*decoder-&gt;sync));
       if (decoder-&gt;sync == 0)
         return -1;
  </code></pre>
  
  <p>Many Thanks,</p>
  
  <p>Rosh</p>