Type Parameter
Syntax {$M minstacksize,maxstacksize}
{$MINSTACKSIZE number}
{$MAXSTACKSIZE number}
Default {$M 16384,1048576}
Scope Global
The $M directive specifies
an application's stack allocation parameters. minstacksize must be an integer
number between 1024 and 2147483647 that specifies the minimum size of an
application's stack, and maxstacksize must be an integer number between
minstacksize and 2147483647 that specifies the maximum size of an application's
stack.
If there is not enough memory available to
satisfy an application's minimum stack requirement, Windows will report an
error upon attempting to start the application.
An application's stack is never
allowed to grow larger than the maximum stack size. Any attempt to grow the
stack beyond the maximum stack size causes an EStackOverflow exception
to be raised.
The $MINSTACKSIZE and $MAXSTACKSIZE
directives allow the minimum and maximum stack sizes to be specified
separately.
The memory allocation directives
are meaningful only in a program. They should not be used in a library or a
unit.
For portability considerations
between Windows and Linux, you should use the longforms of these directives
instead of $M.
Note: The $M directive is used for a different purpose on platforms other than Windows. See Reserved address space for resources.