The Arduino IDE will happily compile and upload a Sketch even if RAM is over-committed. It should detect usage and stop if not enough free RAM. It appears that at least 10% of RAM should be free for heap and stack to grow in, otherwise the sketch becomes unstable.