Re:Ask HN: How does the Activity Monitor in OS X calculate m...
by dbkaplun on Wednesday August 26, 2015 @03:28PM
(#10125427)
You can use otool to see what libraries a program uses:
And for top:
[ Parent
| on HN ]
Re:Ask HN: How does the Activity Monitor in OS X calculate m...
by x0054 on Wednesday August 26, 2015 @09:22PM
(#10126986)
They both use libSystem.B.dylib, other then that, I don't see significant overlap. But everything under the sun uses libSystem.B, so that's no help. I am pretty sure that top pulls the data from sysctl. Apple must have come up with some "clever" way of calculating memory. The only thing I can think of is that they are reporting compressible memory. Meaning that if the system was short on RAM, it could say compress the 8 gigs of ram down to 5 gigs, but they are not doing so no, because that would be a waste of CPU cycles.