Is there a memory map generated someplace?
SRAM is used for global variables, constant strings, the heap and the stack. The amount of space needed for global variables and strings is known at compile time. Heap and stack usage is run-time dependent. A memory map might show plenty of space, but the run-time usage may be very large. On the other hand, run-time usage may be minimal, while the global and string usage may use up nearly all the memory.
There is a FreeMemory() function (it's google time) that can tell you how much memory you have available at any given time. Of course, it uses some memory.