You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to std::rt::min_stack(), the minimum Rust stack size is 2MB. Given that the default stack size on Windows is 1MB, and that is generally plenty for any program I've seen, this seems a bit excessive.
This, btw, contributes to doctest failure of "futures" example from guide-tasks.md on Windows: this example spawns 1000 threads, and in conjunction with #17043, this results in it running out of memory.
The text was updated successfully, but these errors were encountered:
vadimcn
changed the title
Default rust stack size is 2MB
Default Rust thread stack size is 2MB
Sep 6, 2014
The Rust compiler uses a 6MiB stack and then increase than to 20MiB (!!!) when optimizations are disabled. The default stack size on Linux is 8MiB, so that's likely how much is available for the main thread. Rust tends to need a ridiculous amount of stack space, especially without optimizations.
If this is indeed the intended value, at least the test should be adjusted, because right now it's guaranteed to fail on a 32-bit Windows machine, even if the large-address-aware flag were fixed.
According to std::rt::min_stack(), the minimum Rust stack size is 2MB. Given that the default stack size on Windows is 1MB, and that is generally plenty for any program I've seen, this seems a bit excessive.
This, btw, contributes to doctest failure of "futures" example from guide-tasks.md on Windows: this example spawns 1000 threads, and in conjunction with #17043, this results in it running out of memory.
The text was updated successfully, but these errors were encountered: