title: Is there a way to handle heap memory fragmentation in AVR/Arduino microcontrollers?
body: <p>I've been searching for a few days now without any luck.</p>
  
  <p>Heap memory fragmentation is a result of using malloc() and free() heavily in microcontrollers/Arduino.</p>
  
  <p>If using them is unavoidable, how can I defragment the heap every now and then to make sure that the next malloc() call will find contiguous memory to allocate? </p>