diff options
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, |
