rust/src/libstd/sys
bors db5476571d Auto merge of #52847 - upsuper:thread-stack-reserve, r=alexcrichton
Don't commit thread stack on Windows

On Windows, there is a system level resource limitation called commit limit, which is roughly the sum of physical memory + paging files[1]. `CreateThread` by default commits the stack size[2], which unnecessarily takes such resource from the shared limit.

This PR changes it to only reserve the stack size rather than commit it. Reserved memory would only take the address space of the current process until it's actually accessed.

This should make the behavior on Windows match other platforms, and is also a pretty standard practice on Windows nowadays.

[1] https://blogs.technet.microsoft.com/markrussinovich/2008/11/17/pushing-the-limits-of-windows-virtual-memory/
[2] https://docs.microsoft.com/zh-cn/windows/desktop/api/processthreadsapi/nf-processthreadsapi-createthread
2018-08-02 04:22:23 +00:00
..
cloudabi Add missing dyn for cloudabi, redox, unix and wasm 2018-07-10 20:52:29 +02:00
redox Auto merge of #52738 - ljedrz:push_to_extend, r=eddyb 2018-07-29 21:37:47 +00:00
unix Fix coding style. 2018-07-31 09:49:10 +02:00
wasm Don't format!() string literals 2018-07-28 17:58:52 +02:00
windows Auto merge of #52847 - upsuper:thread-stack-reserve, r=alexcrichton 2018-08-02 04:22:23 +00:00
mod.rs Add missing \[allow(missing_docs)\] 2018-06-25 20:38:29 +02:00