I have a HD44780-based LCD with a Modern Device LCD117 Serial LCD Board --> http://www.moderndevice.com/LCD.shtml

I have some code that has been running merrily for the last six months and i have added a couple of more if arguments to it and now it is dropping commands that i send to it. i have spent over 2 weeks trying to work out why!

Yes, you can change the receive buffer to save some RAM. This presumes that you are not receiving a large amount of serial data. The buffer is there so that if you don't do Serial.read() quickly enough you don't lose data (by overrunning the buffer).

Another thing you can look into is moving your string literals into PROGMEM. This moves them from RAM to the flash program space. There is a Flash Library that can make this easier.

Next, look at your variable definitions and make sure you're using appropriate types. Don't use an int when all you need is a byte (like for the pin definitions). Avoid floats unless you really really need floating point results. Use "const" or #define for constants instead of using variables (once again for things like pin definitions or other fixed values). If the value is defined as a constant (or #define) the compiler uses the value where appropriate at compile-time only. This eliminates it's RAM footprint. It all comes down to optimization to preserve a very limited resource.

Lastly, remember that there is a difference between the variables that are static and consume a constant fixed amount of space in the heap, and dynamic usage in the heap and stack - both of which reside in RAM. As you call functions in you sketch, the arguments (and result from the function) are placed on the stack, causing it to temporarily grow. Also, any variables defined in the local scope of the function are added to the heap - also causing it to grow. When the function exits, this stack space and heap usage is released. The problem is that if you're close to running out of RAM from your static usage, the dynamic amount used during function calls can push you over the limit and cause the heap and stack to collide and corrupt data (causing crashes, weird results, etc.). This is very difficult to diagnose since the dynamic usage is only temporary. So the general rule of thumb is to not let your static usage get too high so that you have minimal free RAM.