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

[OSX] use host_statistics64 to get memory metrics #2502

Merged
merged 7 commits into from
Jan 31, 2025

Conversation

giampaolo
Copy link
Owner

We have lots of sporadic failures on OSX related to free virtual_memory(), whose value does not exactly match vm_stat CLI utility. With this PR we use the exact same approach of vm_stat CLI tool, whose source code is here:
https://github.com/apple-open-source/macos/blob/master/system_cmds/vm_stat/vm_stat.c
Hopefully this will reduce such sporadic failures.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
@github-actions github-actions bot added the macos label Jan 31, 2025
@giampaolo giampaolo merged commit 9c114a5 into master Jan 31, 2025
21 of 27 checks passed
@giampaolo giampaolo deleted the osx-freemem-failure branch January 31, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant