Skip to content

Default Rust thread stack size is 2MB #17044

Closed
@vadimcn

Description

@vadimcn

According to std::rt::min_stack(), the minimum Rust stack size is 2MB. Given that the default stack size on Windows is 1MB, and that is generally plenty for any program I've seen, this seems a bit excessive.

This, btw, contributes to doctest failure of "futures" example from guide-tasks.md on Windows: this example spawns 1000 threads, and in conjunction with #17043, this results in it running out of memory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions