Skip to content

Commit 6843dd5

Browse files
committed
Don't round stack size up for created threads
1 parent 08504c6 commit 6843dd5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

library/std/src/sys/windows/thread.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,9 @@ impl Thread {
2828
// PTHREAD_STACK_MIN bytes big. Windows has no such lower limit, it's
2929
// just that below a certain threshold you can't do anything useful.
3030
// That threshold is application and architecture-specific, however.
31-
// Round up to the next 64 kB because that's what the NT kernel does,
32-
// might as well make it explicit.
33-
let stack_size = (stack + 0xfffe) & (!0xfffe);
3431
let ret = c::CreateThread(
3532
ptr::null_mut(),
36-
stack_size,
33+
stack,
3734
thread_start,
3835
p as *mut _,
3936
c::STACK_SIZE_PARAM_IS_A_RESERVATION,

0 commit comments

Comments
 (0)