microsoft / microsoft/mimalloc

Negative current statistic

Open
#301 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
13.4k
Forks
1.2k
Avg merge
4d 45m
Merged PRs (30d)
13

Description

stat->current is increased by amount of memory requested in user application. During free() it's decreased by size of usable block which is usually larger. Therefore after free() the stat isn't zero but has some negative value.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing where stat->current is updated during allocation and free(), comparing the requested memory amount with the usable block size. Reproduce an allocation followed by free() and inspect the resulting statistic. Done means the current statistic reflects the intended accounting without becoming negative.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.