Previous: Mapping Memory Objects, Up: Virtual Memory Interface
This structure is returned in vm_stats by the
vm_statistics
function and provides virtual memory statistics for the system. It has the following members:
long pagesize
- The page size in bytes.
long free_count
- The number of free pages.
long active_count
- The umber of active pages.
long inactive_count
- The number of inactive pages.
long wire_count
- The number of pages wired down.
long zero_fill_count
- The number of zero filled pages.
long reactivations
- The number of reactivated pages.
long pageins
- The number of pageins.
long pageouts
- The number of pageouts.
long faults
- The number of faults.
long cow_faults
- The number of copy-on-writes.
long lookups
- The number of object cache lookups.
long hits
- The number of object cache hits.
The function
vm_statistics
returns the statistics about the kernel's use of virtual memory since the kernel was booted.pagesize
can also be found as a global variablevm_page_size
which is set at task initialization and remains constant for the life of the task.