Use setStackSize on Windows

This commit is contained in:
PoweredByPie 2024-05-18 06:44:52 -07:00
parent 6a3f906382
commit a41f4223de

View file

@ -522,10 +522,13 @@ void mainWrapped(int argc, char * * argv)
int main(int argc, char * * argv) int main(int argc, char * * argv)
{ {
#ifndef _WIN32 // TODO implement on Windows #ifndef _WIN32
// Increase the default stack size for the evaluator and for // Increase the default stack size for the evaluator and for
// libstdc++'s std::regex. // libstdc++'s std::regex.
nix::setStackSize(64 * 1024 * 1024); nix::setStackSize(64 * 1024 * 1024);
#else
// Windows' default stack reservation is 1 MB, going over will fail
nix::setStackSize(1 * 1024 * 1024);
#endif #endif
return nix::handleExceptions(argv[0], [&]() { return nix::handleExceptions(argv[0], [&]() {