I have this code that shows the available sram memory
int freeRam()
{
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
void setup()
{
Serial.begin(9600);
Serial.println(freeRam());
}
void loop()
{
}
The arduino compiler shows a different value.
- the arduino compiler shows 1856 bytes and
- Serial port shows 1850 bytes
What is the correct value?