1.3.19 $M or $MEMORY : Memory sizes

This switch can be used to set the heap and stacksize. Its format is as follows:

{$M StackSize,HeapSize}

where StackSize and HeapSize should be two integer values, greater than 1024. The first number sets the size of the stack, and the second the size of the heap. The stack size setting is ignored on Unix platforms unless stack checking is enabled: in that case the stack checking code will use the size set here as maximum stack size.

On those systems, in addition to the stack size set here, the operating system or the run-time environment may have set other (possibly more strict) limits on stack size using the OS’es ulimit system calls.

The two numbers can be set on the command line using the -Ch and -Cs switches.