microsoft / microsoft/snmalloc
Implement accurate size storage for Windows `_msize` and `_recalloc`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2k
- Forks
- 138
- Avg merge
- 11h 19m
- Merged PRs (30d)
- 5
Description
With snmalloc we can provide a custom meta-data per object that is attached to the standard snmalloc meta-data such as free lists.
We could use this feature to store a single bit per object. The bit being set means the allocation does not consume the whole allocated space. The last byte then represents how much space is not being used by the allocation, i.e. 17 byte allocation, would have the last byte as 15 (32 - 17) and the bit would be set, whereas a 32 byte allocation would not have the bit set.
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 reading the custom per-object metadata support in src/snmalloc/backend_helpers/commonconfig.h, then trace the Windows implementations of _msize and _recalloc. Determine how the proposed bit and final-byte encoding can represent unused allocation space. Done means Windows size reporting and reallocation use accurate object sizes, with relevant behavior verified by the project’s existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100