vm_region.html   [plain text]


<h2>vm_region</h2>
<hr>
<p>
<strong>Function</strong> - Return description of a virtual memory region.
<h3>SYNOPSIS</h3>
<pre>
<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>
</pre>
<h3>PARAMETERS</h3>
<dl>
<p>
<dt> <var>target_task</var> 
<dd>
[in task send right]
The port for the task whose address space contains 
the region.
<p>
<dt> <var>address</var> 
<dd>
[pointer to in/out scalar]
The address at which to start looking for a
region.  The function returns the starting address actually used.
<p>
<dt> <var>size</var> 
<dd>
[out scalar]
The number of bytes in the located region.  The number 
converts to an integral number of virtual pages.
<p>
<dt> <var>flavor</var> 
<dd>
[in scalar]
The type of information to be returned.  Valid values are:
<dl>
<p>
<dt> <strong>VM_REGION_BASIC_INFO</strong>
<dd>
Basic information about the region (size, inheritance, etc.). 
This information is declared by the
     <strong>vm_region_basic_info</strong> structure.
</dl>
<p>
<dt> <var>info</var> 
<dd>
[out structure]
Returned region information.
<p>
<dt> <var>info_count</var> 
<dd>
[in/out scalar]
On input, the maximum size of the buffer; on output, the 
size returned (in natural-sized units).
<p>
<dt> <var>object_name</var> 
<dd>
     This parameter is no longer used.
</dl>
<h3>DESCRIPTION</h3>
<p>
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>.
<h3>NOTES</h3>
<p>
This interface is machine word length specific because of the virtual address
parameter.
<h3>RETURN VALUES</h3>
<dl>
<p>
<dt> <strong>KERN_INVALID_ADDRESS</strong>
<dd>
There is no region at or beyond the specified starting address.
</dl>
<h3>RELATED INFORMATION</h3>
<p>
Functions:
<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>.
<p>
Data Structures:
<a href="vm_region_basic_info.html"><strong>vm_region_basic_info</strong></a>.