Next: , Previous: Debugging a DLL, Up: Microsoft Windows Topics

G.14 Setting Stack Size from gnatlink

It is possible to specify the program stack size at link time. On modern versions of Windows, starting with XP, this is mostly useful to set the size of the main stack (environment task). The other task stacks are set with pragma Storage_Size or with the gnatbind -d command.

Since older versions of Windows (2000, NT4, etc.) do not allow setting the reserve size of individual tasks, the link-time stack size applies to all tasks, and pragma Storage_Size has no effect. In particular, Stack Overflow checks are made against this link-time specified size.

This setting can be done with gnatlink using either: