Is there any way to retrieve the memory pressure percentage using native libraries?
When I run the memory-pressure command, I can see the percentage of free memory, but I’d like to retrieve the same information using a native library.
the source code of memory_pressure is here: https://github.com/apple-oss-distributions/system_cmds/blob/e0c267e80e451b9441ec4f4bb05dd72f0b49d596/memory_pressure/memory_pressure.c
