microsoft / microsoft/mimalloc
question about internal fragmentation limits
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.4k
- Forks
- 1.2k
- Avg merge
- 4d 45m
- Merged PRs (30d)
- 13
Description
Hi Daan,
I've read in the README that in the worst case one can get 12.5% waste from the internal fragmentation.
However, when looking at the bin sizes https://github.com/microsoft/mimalloc/blob/v2.0.5/src/init.c#L56 I see they grow by 25%.
Say from 4096 to 5120. If I understand correctly it means that if one allocates 4097 bytes he would get a block of 5120 bytes.
Is documentation outdated or I am missing something?
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 README statement about 12.5% internal fragmentation and the bin-size definitions in src/init.c at line 56. Check how the allocator handles a request such as 4097 bytes and reconcile the apparent 25% growth; this is done when the README or its explanation accurately reflects the implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100