diff options
| author | Chris Denton <chris@chrisdenton.dev> | 2024-03-06 19:21:34 +0000 |
|---|---|---|
| committer | Chris Denton <chris@chrisdenton.dev> | 2024-03-06 19:54:09 +0000 |
| commit | 87183177255e39b2b3016cf82e8ba2fbb5d397f5 (patch) | |
| tree | c7b67ef90a1fc56daf399219c9844bb6acdbdc2e /library/std/src/sys | |
| parent | 8cd7aaa105e06f99cbad3e9db677eedec1f2c4b4 (diff) | |
Document and test minimal stack size on Windows
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/pal/windows/thread.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/sys/pal/windows/thread.rs b/library/std/src/sys/pal/windows/thread.rs index 601ba095aa4..970bd9c6ce7 100644 --- a/library/std/src/sys/pal/windows/thread.rs +++ b/library/std/src/sys/pal/windows/thread.rs @@ -26,6 +26,8 @@ impl Thread { pub unsafe fn new(stack: usize, p: Box<dyn FnOnce()>) -> io::Result<Thread> { let p = Box::into_raw(Box::new(p)); + // CreateThread rounds up values for the stack size to the nearest page size (at least 4kb). + // If a value of zero is given then the default stack size is used instead. let ret = c::CreateThread( ptr::null_mut(), stack, |
