microsoft / microsoft/mimalloc
Hooking into any allocation made by mimalloc
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.4k
- Forks
- 1.2k
- Avg merge
- 4d 45m
- Merged PRs (30d)
- 13
Description
Hi guys,
I am looking at a way to hook a memory tracer into this allocator. Does and API already exist I can use? Something similar to [_CrtSetAllocHook()](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/crtsetallochook?view=vs-2019), with no distinction between debug or release versions.
If such API doesn't exist, what would be the best way for me to start hooking the tracer "manually" into the source code? I am currently looking only at Windows at the moment, but it would be nice to have a generic way if that exists.
Thank you!
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 by reviewing mimalloc's existing public API and allocation paths to determine whether an allocation-hook interface already exists. The issue provides no file or test entry point; completion would require defining and implementing a generic tracing hook, including the Windows use case.
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