Skip to content

Always build with mimalloc on windows#22495

Open
Veykril wants to merge 1 commit into
rust-lang:masterfrom
Veykril:push-ulmsrltozvqx
Open

Always build with mimalloc on windows#22495
Veykril wants to merge 1 commit into
rust-lang:masterfrom
Veykril:push-ulmsrltozvqx

Conversation

@Veykril
Copy link
Copy Markdown
Member

@Veykril Veykril commented May 30, 2026

It is vastly faster than the system allocator for our workload on windows. We tend to allocate a lot of small objects on differing threads which causes the system allocator lock to contend and block a lot.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 30, 2026
Copy link
Copy Markdown
Contributor

@ChayimFriedman2 ChayimFriedman2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the goal but I think this PR implements it wrong.

View changes since this review

Comment thread xtask/src/flags.rs
return None;
}
let malloc = if self.mimalloc {
let malloc = if self.mimalloc || cfg!(windows) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the place to do that. Instead we should change how we build our distributed server.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I need to annoyingly remember to pass the flag every time I cargo xtask install. Especially with us not shipping debug info I will likely run this way more often now than not as I'll likely depend on self-built servers more

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can make it the default, but not allowing to build without mimalloc seems excessive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants