This is a standard AlphaBASIC-type error (BASIC error 3), and is distinct from the ?A-Shell out of memory error. It occurs when attempting to run a program which runs out of memory in the job's memory partition, the size of which is established by the MEMORY command in the A-Shell configuration file. You can also change the memory partition size dynamically with MEMORY.LIT.LIT or with the MX_MEMORY function.
The memory partition is used for a variety of purposes, including storing program variables, command files during execution, expression and function parameter stacks, and string manipulation. Since the RUN program itself is loaded into dynamically allocated memory, a large RUN file would not be directly responsible for out of memory. However, large RUN programs tend to have large numbers of variables, which will take up memory partition space.
Expressions involving manipulation of large string variables can consume a lot of memory and are a common cause of ?Stack overflow (BASIC error 33) or ?String overflow (BASIC error 54).
Dynamic Arrays (DIMX) operations do not use the memory partition. If you receive an out of memory error in a DIMX statement, it is because the operating system is unable to provide the requested amount of memory at that point in time; increasing your memory partition size will not help—and may make it worse by effectively taking that memory out of the system pool.
You use the MEM(0) function within a running program to monitor the amount of memory available in the memory partition.