Skip to content

-Zthreads threads seem to try to allocate memory up front regardless of if it will actually be needed or not #117638

Closed
@matthiaskrgr

Description

@matthiaskrgr

I tried this code:

pub fn main() {}

Build with rustc main.rs -Zthreads=999999

I expected to see this happen: explanation

Instead, this happened: explanation

Meta

rustc --version --verbose:

rustc 1.75.0-nightly (e1fcecb1b 2023-11-06)
binary: rustc
commit-hash: e1fcecb1b9930f109a8c1cf2b690e03483a41289
commit-date: 2023-11-06
host: x86_64-unknown-linux-gnu
release: 1.75.0-nightly
LLVM version: 17.0.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions