Skip to content

[OSX] use host_statistics64 to get memory metrics#2502

Merged
giampaolo merged 7 commits intomasterfrom
osx-freemem-failure
Jan 31, 2025
Merged

[OSX] use host_statistics64 to get memory metrics#2502
giampaolo merged 7 commits intomasterfrom
osx-freemem-failure

Conversation

@giampaolo
Copy link
Copy Markdown
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.

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
@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.

1 participant