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
Fix RAM display on non-Linux hosts #788
Conversation
A number of small bugs worked together to make Linux RAM display correct, but MacOS and BSD off by a factor of 1024 Fixes #787
I reset |
More info: Pressing
I'll be happy to run any tests you'd like. |
Print the test number first, for better readability.
I added tests on |
Looks like your fix was a step in the right direction. I found an issue with adding the two fields, which I fixed. I also fixed the test case. I added my own Mac as a test case, and fixed an issue I discovered on Cygwin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good, works well on my setups.
A number of small bugs that worked together to make Linux RAM display correct, but MacOS and BSD off by a factor of 1024.
Fixes #787
Note that this was not caught by the tests, as the tests only check what
__lp_ram_bytes()
returns, not what_lp_ram()
returns. Would be good to have that added @nojhan if you want to do that. Specifically the values of$lp_ram
and$lp_ram_human
.