Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我真的需要知道一种获取当前设备的方法:
任何信息、代码或任何东西都是有帮助的。
提前致谢。
桌面使用 Mach 调用host_statistics64()来获取该信息。您可以在 vm_stat 命令的源代码中看到它的使用情况。
host_statistics64()