Is there a way to retrieve memory pressure information from macOS using Swift or C/C++?
In Activity Monitor, there’s a chart labeled “Memory Pressure” which provides a discrete metric of RAM usage:
Green = system memory usage is fine Yellow = moderate pressure Red = high memory pressure
I’d like to know how to programmatically access this metric.
Check out the Dispatch memory pressure source.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"