-
Notifications
You must be signed in to change notification settings - Fork 5
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
Mac_BSD_resources underestimates RAM size #4
Comments
@fmetzger reports that on his 10.10.5 box, |
I tested on my MacBookPro11,1 running Mac OS X 10.10.5.
|
$ uname -v; sysctl hw.physmem; sysctl hw.memsize; |
$ uname -v; sysctl hw.physmem; sysctl hw.memsize; |
$ uname -v; sysctl hw.physmem; sysctl hw.memsize; |
Per PR #6, my proposed fix is to use Thank you all for testing and contibuting! |
Fix #4, use `sysctl memsize` for Mac benchmark
In case no one figured this out (which they did)... In sysctl.h, The value you are getting for hw.physmem is the maximum value a 32-bit signed int can hold. |
Always nice to get more clarity, even (way) after the fact. :) |
Mac_BSD_resources.py
usessysctl hw.physmem
to find the size of RAM. Unfortunately, the info is off by a factor of 4 on a MacBook Pro 8,2 running Mac OS X 10.6.8 on which I'm testing this. (At least we are underestimating the size, so this only hurts the Seattle install, but not the resource donor.)sysctl hw.memsize
gives the correct memory size, 8 GB here.See also https://discussions.apple.com/thread/1753088?start=0&tstart=0
We should test what the different
hw.
keys return on a couple of machines, and then decide on a fix.The text was updated successfully, but these errors were encountered: