システムを監視するためのMac OSプログラムを作成しようとしています(アクティビティモニターに似たもの)。関数 vm_stat を見て、実行すると次のようになりました。
Mach Virtual Memory Statistics: (page size of 4096 bytes)
Pages free: 438386.
Pages active: 236438.
Pages inactive: 113750.
Pages speculative: 34293.
Pages wired down: 225027.
"Translation faults": 11132566.
Pages copy-on-write: 319385.
Pages zero filled: 6618647.
Pages reactivated: 23071.
Pageins: 421804.
Pageouts: 153240.
Object cache: 14 hits of 24183 lookups (0% hit rate)
ただし、アクティビティモニターを実行すると、次のような結果が得られました。
Page Ins: 1.61gb (8.00kb/sec)
Page outs: 598.6 MB
これに関して質問があります: なぜ vmstat の空きページが非常に小さいのですか (アクティビティ モニターと比較して)