I have the following output of my sketch for the Arduino Mega so far:
Sketch uses 25020 bytes (9%) of program storage space. Maximum is 253952 bytes.
Global variables use 6919 bytes (84%) of dynamic memory, leaving 1273 bytes for
local variables. Maximum is 8192 bytes.
Low memory available, stability problems may occur.
I think 1273 bytes is not so less for most sketches, although mine is quite big (several thousand of lines, and I'm about half).
I was wondering if the IDE is so smart to statically analyze my code to see what my dynamic storage is (about 600 bytes) and/or calculates some expected stack size (several hundred bytes at least).
Or is it just a (very) safe fixed or percentage-based value?