Arduino tool to enumerate where RAM is being used?
I use this code for Heap memory of AVR (UNO, Mega, etc.):

int freeRam()
{
     extern int __heap_start, *__brkval;
     int v;
     return (int)&amp;v - (__brkval == 0 ? (int)&amp;__heap_start : (int)__brkval);
}


To show heap memory just use Serial.print("Write here a name of the function from which you print it"); Serial.println(freeRam()); anywhere in the code.

Compiler shows stack memory but not the heap, so this code helps me to find exact place where my program uses too much of heap memory. I just print it in every suspicious place in my code.

I hope this will help.