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.

RELATED INFORMATION

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

Data Structures: vm_region_basic_info.