microsoft / microsoft/mimalloc

current_commit stat negative

Open
#929 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
13.4k
Forks
1.2k
Avg merge
4d 45m
Merged PRs (30d)
13

Description

I am currently porting mimalloc to a new platform. When running it with my application I do get negative values for `current_commit` from `mi_process_info` after some time. It's a debug build so `MI_STAT` is set to 2. My port doesn't provide an implementation of `_mi_prim_process_info` so this is completely based on mimallocs own tracking.
I am working off of the latest tagged version `v2.1.7`.

Is this expected? If not is there anything known that could cause this and that I could look into?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with mi_process_info and the internal tracking used when MI_STAT is set to 2; inspect how current_commit changes when _mi_prim_process_info has no platform implementation. Reproduce the negative value on mimalloc v2.1.7 and trace the accounting until you can determine whether it is expected or identify the tracking path that needs correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.