Explorar o código

* set stacksize in the main program, it makes no sense to set it in fpcdefs.inc and parse it a zillion times
* use maxstacksize to set stacksize on windows

git-svn-id: trunk@12649 -

florian %!s(int64=16) %!d(string=hai) anos
pai
achega
9869a2b29d
Modificáronse 2 ficheiros con 15 adicións e 15 borrados
  1. 0 15
      compiler/fpcdefs.inc
  2. 15 0
      compiler/pp.pas

+ 0 - 15
compiler/fpcdefs.inc

@@ -5,21 +5,6 @@
 {$inline on}
 {$interfaces corba}
 
-{$ifdef win32}
-  { 256 MB stack }
-  { under windows the stack can't grow }
-  {$MEMORY 256000000}
-{$else win32}
-  {$ifdef win64}
-    { 512 MB stack }
-    { under windows the stack can't grow }
-    {$MEMORY 512000000}
-  {$else win64}
-    { 1 MB stack }
-    {$MEMORY 1000000}
-  {$endif win64}
-{$endif win32}
-
 { This reduces the memory requirements a lot }
 {$PACKENUM 1}
 {$ifdef FPC_HAS_VARSETS}

+ 15 - 0
compiler/pp.pas

@@ -143,6 +143,21 @@ program pp;
   {$endif i386}
 {$endif support_mmx}
 
+{$ifdef win32}
+  { 256 MB stack }
+  { under windows the stack can't grow }
+  {$MAXSTACKSIZE 256000000}
+{$else win32}
+  {$ifdef win64}
+    { 512 MB stack }
+    { under windows the stack can't grow }
+    {$MAXSTACKSIZE 512000000}
+  {$else win64}
+    { 1 MB stack }
+    {$STACKSIZE 1000000}
+  {$endif win64}
+{$endif win32}
+
 uses
 {$ifdef cmem}
   cmem,