Skip to content

add support for static override on Windows #1075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Noxybot
Copy link
Contributor

@Noxybot Noxybot commented Apr 15, 2025

No description provided.

@daanx
Copy link
Collaborator

daanx commented Jun 8, 2025

I don't think this can really work? Nowadays, one should link with the universal C runtime library which is a DLL so there is no way to statically override the allocator (unless I guess we link to a static CRT -- is that the use case that you envision?).

@Noxybot
Copy link
Contributor Author

Noxybot commented Jun 8, 2025

Nowadays, one should link with the universal C runtime library which is a DLL

There are multiple reasons why one would want to link CRT statically.

  1. Security (harder to do DLL injection)
  2. Perf (sometime not having to load DLL might make your process to start up faster)
  3. Consistency
  4. Not having to use mimalloc-redirrect.dll and avoid shipping arm64 version for Windows (this is actually a big one. Static overrides would work for x86 binaries on Arm64EC)

Having said this, I can also confirm that we using this patch internally for our app that links CRT statically and it works fine / robust :)

@Noxybot
Copy link
Contributor Author

Noxybot commented Jun 8, 2025

@microsoft-github-policy-service agree company="Roblox"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants