mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 12:39:24 +02:00
* check whether the stack size specified in the $M directive exceeds the maximum
stack size * allow setting a stack size of _exactly_ 1024 bytes with the $M directive git-svn-id: trunk@27963 -
This commit is contained in:
parent
421139e77a
commit
c868a5e0ea
@ -706,8 +706,15 @@ unit scandir;
|
||||
begin
|
||||
current_scanner.skipspace;
|
||||
l:=current_scanner.readval;
|
||||
if l>1024 then
|
||||
stacksize:=l;
|
||||
if (l>=1024)
|
||||
{$ifdef cpu16bitaddr}
|
||||
and (l<=65521) { TP7's $M directive allows specifying a stack size of
|
||||
65521, but it actually sets the stack size to 65520 }
|
||||
{$else cpu16bitaddr}
|
||||
and (l<67107840)
|
||||
{$endif cpu16bitaddr}
|
||||
then
|
||||
stacksize:=min(l,{$ifdef cpu16bitaddr}65520{$else}67107839{$endif});
|
||||
if c=',' then
|
||||
begin
|
||||
current_scanner.readchar;
|
||||
|
Loading…
Reference in New Issue
Block a user