The question says it all. Attempting to increase the stack size in the linker options generates the error :
Maximum Stack Size must be an integer between 65536 and 16777216.
Is this 16MB limit a fundamental limitation of the Delphi compiler or is this an arbitrary limit imposed by the IDE? Is there another way to increase this value?
Note (in anticipation of the comments...) :
You can increase it as high as 2147483647, using the {$MAXSTACKSIZE}
(or {$M minstacksize maxstacksize}
compiler directive. Note this is a different use for {$M}
than the {$M+/-}
used to indicate generation of RTTI for classes.
From the XE6 docwiki (it applied to prior versions as well):
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With