microsoft / microsoft/mimalloc
Can't create a Windows application that dynamically decides to use or not use redirection.
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.4k
- Forks
- 1.2k
- Avg merge
- 4d 45m
- Merged PRs (30d)
- 13
Description
Hi,
I'm writing an application that will propose to the user the options to use or not use allocator redirection. But I can't dynamically load the redirection dll using LoadLibary() : i get next error message
mimalloc-redirect: error: mimalloc-redirect.dll seems to be initialized after ucrtbase.dll
I know there is an environment variable that can be set to enable/disable redirection but that is not what we are looking for. all our application options are read by the application itself from a DB. but then its already too late. the redirection dll has already been loaded and redirected the mallocs.
So i was hoping to find a "dynamic" solution. Note that I was able to do this successfully with the tbb-malloc library. So the actual "rewiring" of the windows call's dynamically should in theory be possible ( i hope ) ...
Why is it that having loaded ucrtbase.dll before mimalloc-redirect.dll is an issue ? can this be solved ? can i help with that ?
Thanks a lot, Karel.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Windows LoadLibrary path and the mimalloc-redirect.dll error about initialization after ucrtbase.dll. Investigate whether redirection can be selected after the application reads its database options, and compare that behavior with the environment-variable approach described in the issue. Done means a confirmed supported solution or a clearly documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100