Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

current_commit stat negative #929

Open
maxbachmann opened this issue Aug 27, 2024 · 2 comments
Open

current_commit stat negative #929

maxbachmann opened this issue Aug 27, 2024 · 2 comments

Comments

@maxbachmann
Copy link

maxbachmann commented Aug 27, 2024

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?

@daanx
Copy link
Collaborator

daanx commented Aug 27, 2024

That looks like spam? -- I would not click on that link. Let me see if I can remove it..
(as an aside, I think the commit can be negative due to thread interaction but let me think about this a bit more and reply in more detail)

@maxbachmann
Copy link
Author

maxbachmann commented Aug 28, 2024

From my understanding current_commit should match the amount of memory committed in prim.c. If I add my own atomic to track the calls in there the numbers match for a while and start to go out of sync once threads get destroyed.

These two numbers match for a while and then appear to go out of sync once threads start to get destroyed. At this point current_commit appears to get decreased by 32mb without any corresponding decommit in prim.c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@daanx @maxbachmann and others