kvmgetinfo Kernel Service
Purpose
Retrieves Virtual Memory Manager (VMM) information.
Syntax
#include <sys/vminfo.h>
Description
The kvmgetinfo kernel service returns the current
value of certain VMM parameters.
Parameters
out |
Specifies the address where VMM information should be returned. |
command |
Specifies which information should be returned. The valid values
for the command parameter are decribed below:
- VMINFO
- The content of vminfo structure (described in sys/vminfo.h) will be returned. The out parameter should point to a vminfo structure
and the arg parameter should be the size of this structure.
The smaller of the arg or sizeof (struct vminfo) parameters will be copied.
- VMINFO_ABRIDGED
- The content of the vminfo structure (described
in the sys/vminfo.h file) is returned. For this command,
only the non-time consuming statistics are updated, so this command must be
used in performance-critical applications rather than the VMINFO command. The out parameter must point
to a vminfo structure and the arg parameter must be the size of this structure. The smaller of the arg or sizeof (struct vminfo) parameters are copied.
- VM_PAGE_INFO
- The size, in bytes, of the page backing the address specified in the addr field of the vm_page_info structure
(described in the sys/vminfo.h file) is returned. The out parameter should point to a vm_page_info structure with the addr field set to the desired
address of which to query the page size. This address, addr, is interpreted as an address in the address space of the current
running process. The arg parameter should be the size
of the vm_page_info structure.
- IPC_LIMITS
- The content of the ipc_limits struct (described
in the sys/vminfo.h file) is returned. The out parameter should point to an ipc_limits structure
and arg should be the size of this structure. The
smaller of the arg or sizeof (struct ipc_limits) parameters will be copied. The ipc_limits struct contains the inter-process communication (IPC) limits
for the system.
- VMINFO_GETPSIZES
- Reports a system's supported page sizes. When arg is 0, the out parameter is ignored, and the
number of supported page sizes is returned. When arg is
greater than 0, arg indicates the number of page sizes
to report, and out must be a pointer to an array with arg number of psize_t types. The array of psize_t types
is updated with the system's supported page sizes in sorted order starting
with the smallest supported page size. The number of array entries updated
with page sizes is returned.
- VMINFO_PSIZE
- Reports detailed VMM statistics for a specified page size. The out parameter must point to a vminfo_psize structure
with the psize field set to a page size, in bytes,
for which to return statistics. The arg parameter
should be the size of the vminfo_psize structure.
|
arg |
An additional parameter that will depend upon the command parameter. |
Execution Environment
The kvmgetinfo kernel service can be called from
the process environment only.
Return Values
The following return values apply to all commands other than VMINFO_GETPSIZES:
0 |
Indicates successful completion. |
ENOSYS |
Indicates the command parameter is not valid
(or not yet implemented). |
EINVAL |
When VM_PAGE_INFO is the command, the adr field
of the vm_page_info structure is an invalid address. |
When VMINFO_GETPSIZES is specified as the command,
-1 is returned if the kvmgetinfo() kernel service is
unsuccessful. Otherwise, the kvmgetinfo() kernel service
returns a number of page sizes when the VMINFO_GETPSIZES command is specified.
Related Information
Memory Kernel Services and Understanding Virtual Memory Manager Interfaces in AIX Version 6.1 Kernel Extensions and Device Support Programming Concepts.
[ Top of Page | Previous Page | Next Page | Index | Feedback ]