microsoft / microsoft/mimalloc
Add an API to query why a nullptr was returned by `mi_malloc` and similar APIs
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.4k
- Forks
- 1.2k
- Avg merge
- 4d 45m
- Merged PRs (30d)
- 13
Description
Is there a way to query _why_ `mi_malloc` returns a null pointer ? E.g. was there an error ? If so, what was the error ?
The same would be interesting to support for all APIs that do not return an error code.
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 the mi_malloc and similar APIs that can return a null pointer, then inspect how allocation failures are currently represented. Define which failure reasons should be queryable and how callers would obtain them across the affected APIs. Done means the API scope and failure semantics are agreed and documented with coverage for the supported cases.
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
- 25/100