According to some experiments, the guard area size is 16KB on Windows 64. (Stack size must be a multiple of the allocation granularity - 64KB - to get better guard size estimation). No OS independant testcase.
Tested on x86_64-pc-linux-gnu, committed on trunk 2011-09-27 Tristan Gingold <ging...@adacore.com> * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for windows 64.
Index: s-tassta.adb =================================================================== --- s-tassta.adb (revision 179247) +++ s-tassta.adb (working copy) @@ -1164,7 +1164,7 @@ if System.Stack_Usage.Is_Enabled then declare - Guard_Page_Size : constant := 12 * 1024; + Guard_Page_Size : constant := 16 * 1024; -- Part of the stack used as a guard page. This is an OS dependent -- value, so we need to use the maximum. This value is only used -- when the stack address is known, that is currently Windows.