On Windows, the stack size for an executable is primarily configured at link time using the `/STACK` linker option in Visual Studio or `--stack` for GCC/MinGW, which sets both the total reserved virtual memory and the initially committed physical memory. The default stack size is typically 1 MB.