-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
internalA refactor or improvement that is not user-facingA refactor or improvement that is not user-facing
Description
RUST_MIN_STACK is fairly obscure and barely documented but it does exist specifically to do exactly what UV_STACK_SIZE does (it would affect all non-main threads and not just tokio threads, but the fact that we only resize tokio threads is not really intentional so much as Convenient).
Alternatively: it's really unclear why we need to set the stack size specifically on Windows. All information I can find suggests Rust already forces Windows, macOS, and Linux to all use 2MiB stacks for non-main-threads by default (and UV_STACK_SIZE doesn't affect the main thread).
Unfortunately there's a ton of possibilities:
- Newer versions of Rust fixed this and we don't actually need it anymore?
- Windows wastes more of your stack space with OS-internal datastructures (like the TEB)?
- Some platform-specific types are weirdly bigger on Windows?
- Windows' ABI/codegen forces more stackspills bloating the stack way more?
Metadata
Metadata
Assignees
Labels
internalA refactor or improvement that is not user-facingA refactor or improvement that is not user-facing