mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Use setStackSize on Windows
This commit is contained in:
parent
6a3f906382
commit
a41f4223de
1 changed files with 4 additions and 1 deletions
|
@ -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], [&]() {
|
||||||
|
|
Loading…
Reference in a new issue