Minimum Safe SRAM Memory Level (for Uno)?

I am working on a large project, and SRAM memory is getting very tight. I am monitoring the available memory at several points in the program (using below code, from Adafruit website), but my question is, at what level have you generally found low memory to get critical and likely to cause unexpected crashes? 100 bytes? 200? 500?

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

Post your code. Did you remember to use PROGMEM or Flash memory for all your strings?

Can always "upgrade" the processor for more SRAM too: Atmega1284P, 16K SRAM, twice that of the Mega2560.
I offer kits/assembled boards in a couple of form factors, more info at:
http://www.crossroadsfencing.com/BobuinoRev17/


HazardMinds, the code is probably too long to post, but I have used the F() macro for all strings (and there aren't many). I am using the smallest possible data types for all variables and minimizing the use of global variables. I do however need a fair number of libraries to work with connected devices.

You can attach the code file it you go under Additional Options -> Attach.

Can you put anything in the heap?

HazardsMind, the code is attached; I welcome any suggestions.

Copy of project code.ino (22.3 KB)

I can't compile it because I don't have the libraries your using, and even if I did have them, I don't have the hardware.

What board are you using?