FREEMEM (System Variable)

is a read-only system variable, which is described in the built-in help file of SmileBasic V2 as "Remaining memory available to user". However, it gives no indication that an  error is imminent, as evidenced by the following:

OK CLEAR:DIM A(100000):?FREEMEM 1023 OK DIM B(100000):?FREEMEM 1023 OK DIM C(62145) Out of memory (DIM) OK DIM C(62144):?FREEMEM 1023 OK DIM D(1) Out of memory (DIM)