[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

vmgetinfo Subroutine

Purpose

Retrieves Virtual Memory Manager (VMM) information.

Library

Standard C Library (libc.a)

Syntax

#include <sys/vminfo.h>

int vmgetinfo(void *out, int command, int arg)

Description

The vmgetinfo subroutine returns the current value of certain VMM parameters.

Parameters

arg Additional parameter which depends on the command parameter.
command Specifies which information should be returned. The command parameter has the following valid value:
VMINFO
The content of the vminfo structure (described in sys/vminfo.h) is returned. The out parameter should point to a vminfo structure and arg should be the size of this structure. The smaller of the arg or sizeof (struct vminfo) parameters will be 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 sys/vminfo.h) 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. 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.
out Specifies the address where VMM information should be returned.

Return Values

If the vmgetinfo subroutine is successful, a value of 0 is returned. Otherwise, a value of -1 is returned, and the errno global variable is set to indicate the error.

Error Codes

The vmgetinfo does not succeed if the following are true:

EFAULT The copy operation to the buffer was not successful.
ENOSYS The command parameter is not valid (or not yet implemented).
EINVAL When VM_PAGE_INFO is the command, the addr field of the vm_page_info structure is an invalid address.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]