how to compute free RAM

hi, it seems that I have problems with RAM shortage. Therefore I searched in the forum for suitable postings how to measure free RAM. I found some but they do not work. I guess that they need some header files which I don't know.

One posting suggested

int free=freeRAM();

The compiler reports that freeRAM() was not declared in this scope.

Another posting suggested

(int) &v - (brkval == 0 ? (int) &heap_start : (int) __brkval)

The compiler reports that v, __brkval and __heap_start are not declared.

What header files or libraries have to be included in order to use these examples? What else methods can be used?

SupArdu

Find out how to use freeRam() here: http://playground.arduino.cc/Code/AvailableMemory

Post your code... I'm sure we'll have suggestions.

Cheers, /dev