vm_region.html   [plain text]

<strong>Function</strong> - Return description of a virtual memory region.
<strong>kern_return_t   vm_region</strong>
                 <strong>(vm_task_t</strong>                    <var>target_task</var>,
                  <strong>vm_address_t</strong>                     <var>address</var>,
                  <strong>vm_size_t</strong>                           <var>size</var>,
                  <strong>vm_region_flavor_t</strong>                <var>flavor</var>,
                  <strong>vm_region_info_t</strong>                    <var>info</var>,
                  <strong>mach_msg_type_number_t</strong>        <var>info_count</var>,
                  <strong>memory_object_name_t</strong>         <var>object_name</var><strong>);</strong>
<dt> <var>target_task</var> 
[in task send right]
The port for the task whose address space contains 
the region.
<dt> <var>address</var> 
[pointer to in/out scalar]
The address at which to start looking for a
region.  The function returns the starting address actually used.
<dt> <var>size</var> 
[out scalar]
The number of bytes in the located region.  The number 
converts to an integral number of virtual pages.
<dt> <var>flavor</var> 
[in scalar]
The type of information to be returned.  Valid values are:
<dt> <strong>VM_REGION_BASIC_INFO</strong>
Basic information about the region (size, inheritance, etc.). 
This information is declared by the
     <strong>vm_region_basic_info</strong> structure.
<dt> <var>info</var> 
[out structure]
Returned region information.
<dt> <var>info_count</var> 
[in/out scalar]
On input, the maximum size of the buffer; on output, the 
size returned (in natural-sized units).
<dt> <var>object_name</var> 
     This parameter is no longer used.
The <strong>vm_region</strong> function returns information on a region
within the specified 
task's address space.
The function begins looking at <var>address</var> 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 <var>address</var>.
This interface is machine word length specific because of the virtual address
<dt> <strong>KERN_INVALID_ADDRESS</strong>
There is no region at or beyond the specified starting address.
<a href="vm_allocate.html"><strong>vm_allocate</strong></a>,
<a href="vm_deallocate.html"><strong>vm_deallocate</strong></a>,
<a href="vm_inherit.html"><strong>vm_inherit</strong></a>,
<a href="vm_protect.html"><strong>vm_protect</strong></a>,
<a href="vm_behavior_set.html"><strong>vm_behavior_set</strong></a>.
Data Structures:
<a href="vm_region_basic_info.html"><strong>vm_region_basic_info</strong></a>.