add support for static override on Windows
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?).
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.
- Security (harder to do DLL injection)
- Perf (sometime not having to load DLL might make your process to start up faster)
- Consistency
- Not having to use
mimalloc-redirrect.dlland 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 :)
@microsoft-github-policy-service agree company="Roblox"
Hi, what's the status on this PR? We also link the CRT statically and would be very much interested in this