Back to Darwin Xnu

Vm Region

osfmk/man/vm_region.html

latest2.1 KB
Original Source

vm_region


Function - Return description of a virtual memory region.

SYNOPSIS

**kern\_return\_t vm\_region**** (vm\_task\_t **target\_task,** vm\_address\_t **address,** vm\_size\_t **size,** vm\_region\_flavor\_t **flavor,** vm\_region\_info\_t **info,** mach\_msg\_type\_number\_t **info\_count,** memory\_object\_name\_t **object\_name** );**

PARAMETERS

target_task[in task send right] The port for the task whose address space contains the region.

address[pointer to in/out scalar] The address at which to start looking for a region. The function returns the starting address actually used.

size[out scalar] The number of bytes in the located region. The number converts to an integral number of virtual pages.

flavor[in scalar] The type of information to be returned. Valid values are:

VM_REGION_BASIC_INFO Basic information about the region (size, inheritance, etc.). This information is declared by the vm_region_basic_info structure.

info[out structure] Returned region information.

info_count[in/out scalar] On input, the maximum size of the buffer; on output, the size returned (in natural-sized units).

object_name This parameter is no longer used.

DESCRIPTION

The vm_region function returns information on a region within the specified task's address space. The function begins looking at address and continues until it finds an allocated region. If the input address is within a region, the function uses the start of that region. The starting address for the located region is returned in address.

NOTES

This interface is machine word length specific because of the virtual address parameter.

RETURN VALUES

KERN_INVALID_ADDRESS There is no region at or beyond the specified starting address.

Functions: vm_allocate, vm_deallocate, vm_inherit, vm_protect, vm_behavior_set.

Data Structures: vm_region_basic_info.