-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
Incorrect macOS RAM Usage Statistics? #1573
Comments
Some interesting points were brought up in my pull request on fastfetch we might want to consider: fastfetch-cli/fastfetch#1463 (comment)
Also wanted you to consider my response to them: fastfetch-cli/fastfetch#1463 (comment)
I'll leave it up to you all if this approach is correct or not. |
This is likely a duplicate of #1439. Can you please review that PR and see if it matches your vision? |
They are doing:
Which appears to be what fastfetch is doing, but fastfetch is also basing their code on the same person's repository; I would suggest doing what Apple's official top(1) program does instead. I'll reference this ticket on their pull request. |
I remember hearing from you all in the past that htop very intentionally calculates ram usage differently from top and also intentionally gives contradicting values between the two programs. You explained why you chose to do this but I can't remember what the reason was. Right now, how you do it is
(active_count + wire_count) * page_size
, as can be seen here:htop/darwin/Platform.c
Line 305 in 28dcbd7
This is what top(1) does: https://github.com/apple-opensource/top/blob/e7979606cf63270663a62cfe69f82d35cef9ba58/globalstats.c#L433-L435 Note this link is providing source code from an unofficial mirror of Apple's Open Source projects, because Apple's official source code repositories for top(1) have been taken away from public viewing. It is now closed-source I guess. It gets ram by doing
(wire_count + inactive_count + active_count + compressor_page_count) * page_size
. See these other pull requests I've made for more details:If you happen to like this idea and are willing to accept my code contribution I will go ahead and make a pull request.
The text was updated successfully, but these errors were encountered: