[COMMITTED,11/35] ada: Increase stack size for Windows tasking programs

Message ID 20241025091107.485741-11-poulhies@adacore.com
State Committed
Commit c3b0c0b0dc464537924d8641cb33ffa30698e0ee
Headers
Series [COMMITTED,01/35] ada: Pass parameters of full access unconstrained array types by copy in calls |

Commit Message

Marc Poulhiès Oct. 25, 2024, 9:10 a.m. UTC
  From: squirek <squirek@adacore.com>

This patch increases the default tasking stack size for Windows tasking
program to 8 mb to avoid use of pragma Linker_Options in the general case.

gcc/ada/ChangeLog:

	* libgnarl/s-taprop__mingw.adb: Modify stack size and update
	documentation.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/libgnarl/s-taprop__mingw.adb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
  

Patch

diff --git a/gcc/ada/libgnarl/s-taprop__mingw.adb b/gcc/ada/libgnarl/s-taprop__mingw.adb
index 8c7f59f1c5d..3c4e4b91a7e 100644
--- a/gcc/ada/libgnarl/s-taprop__mingw.adb
+++ b/gcc/ada/libgnarl/s-taprop__mingw.adb
@@ -68,11 +68,11 @@  package body System.Task_Primitives.Operations is
    use System.Win32;
    use System.Win32.Ext;
 
-   pragma Link_With ("-Xlinker --stack=0x200000,0x1000");
-   --  Change the default stack size (2 MB) for tasking programs on Windows.
-   --  This allows about 1000 tasks running at the same time. Note that
-   --  we set the stack size for non tasking programs on System unit.
-   --  Also note that under Windows XP, we use a Windows XP extension to
+   pragma Link_With ("-Xlinker --stack=0x800000,0x1000");
+   --  Change the default stack size (8 MB) for tasking programs on Windows.
+   --  This allows at least 1000 tasks running at the same time. Note that
+   --  we set the stack size for non tasking programs in the System unit.
+   --  Also note that under Windows, we use a Windows extension to
    --  specify the stack size on a per task basis, as done under other OSes.
 
    ----------------