title: simple c malloc
body: <p>While there are lots of different sophisticated implementations of <code>malloc</code> / <code>free</code> for C/C++, I'm looking for a really simple and (especially) small one that works on a fixed-size buffer and supports <code>realloc</code>. Thread-safety etc. are not needed and my objects are small and do not vary much in size. Is there any implementation that you could recommend?</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>I'll use that implementation for a communication buffer at the receiver to transport objects with variable size (unknown to the receiver). The allocated objects won't live long, but there are possibly several objects used at the same time.</p>
  
  <p>As everyone seems to recommend the standard malloc, I should perhaps reformulate my question. What I need is the "simplest" implementation of malloc on top of a buffer that I can start to optimize for my own needs. Perhaps the original question was unclear because I'm not looking for an optimized malloc, only for a simple one. I don't want to start with a glibc-malloc and extend it, but with a light-weight one.</p>