-<h2>vm_msync</h2>\r<hr>\r<p>\r<strong>Function</strong> - Synchronize the specified region of virtual memory.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t vm_msync</strong>\r <strong>(vm_task_t</strong> <var>target_task</var>,\r <strong>vm_address_t</strong> <var>address</var>,\r <strong>vm_size_t</strong> <var>size</var>,\r <strong>target_task</strong> <var>sync_flags</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>target_task</var> \r<dd>\r[in task send right]\rThe port for the task whose address space contains \rthe region.\r<p>\r<dt> <var>address</var> \r<dd>\r[in scalar]\rThe starting address for the region.\r<p>\r<dt> <var>size</var> \r<dd>\r[in scalar]\rThe number of bytes in the region.\r<p>\r<dt> <var>sync_flags</var> \r<dd>\r[in scalar]\rThe bit-wise <strong>OR</strong> of flags affecting the synchronization. \rSpecifying both <strong>VM_SYNC_SYNCHRONOUS</strong> and\r<strong>VM_SYNC_ASYNCHRONOUS</strong> is invalid.\r<dl>\r<p>\r<dt> <strong>VM_SYNC_INVALIDATE</strong>\r<dd>\rFlushes pages in the range. Only precious pages are returned to \rthe memory manager unless either <strong>VM_SYNC_SYNCHRONOUS</strong> or\r<strong>VM_SYNC_ASYNCHRONOUS</strong> is also set.\r<p>\r<dt> <strong>VM_SYNC_SYNCHRONOUS</strong>\r<dd>\rWrites dirty and precious pages back to the memory manager, \rwaits for pages to reach backing storage.\r<p>\r<dt> <strong>VM_SYNC_ASYNCHRONOUS</strong>\r<dd>\rWrites dirty and precious pages back to the memory manager, \rreturns without waiting for pages to reach backing storage.\r</dl>\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>vm_msync</strong> function synchronizes the contents of\ra memory range with its \rbacking store image by flushing or cleaning the contents of the\rspecified range \rto the range's memory manager, engaging in a synchronization protocol with \rthe manager (<strong>memory_object_synchronize</strong>). \rThe client does not return from \rthis call until the memory manager responds (to the kernel) with\r<strong>memory_object_synchronize_completed</strong>.\r<h3>NOTES</h3>\r<p>\rThis interface is machine word length specific because of the virtual address\rparameter.\r<h3>RETURN VALUES</h3>\r<dl>\r<p>\r<dt> <strong>KERN_INVALID_ADDRESS</strong>\r<dd>\rThe address is illegal or specifies a non-allocated region.\r</dl>\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="memory_object_synchronize.html"><strong>memory_object_synchronize</strong></a>,\r<a href="MO_SY_completed.html"><strong>memory_object_synchronize_completed</strong></a>.\r
\ No newline at end of file
+<h2>vm_msync</h2>
+<hr>
+<p>
+<strong>Function</strong> - Synchronize the specified region of virtual memory.
+<h3>SYNOPSIS</h3>
+<pre>
+<strong>kern_return_t vm_msync</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>target_task</strong> <var>sync_flags</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>
+[in scalar]
+The starting address for the region.
+<p>
+<dt> <var>size</var>
+<dd>
+[in scalar]
+The number of bytes in the region.
+<p>
+<dt> <var>sync_flags</var>
+<dd>
+[in scalar]
+The bit-wise <strong>OR</strong> of flags affecting the synchronization.
+Specifying both <strong>VM_SYNC_SYNCHRONOUS</strong> and
+<strong>VM_SYNC_ASYNCHRONOUS</strong> is invalid.
+<dl>
+<p>
+<dt> <strong>VM_SYNC_INVALIDATE</strong>
+<dd>
+Flushes pages in the range. Only precious pages are returned to
+the memory manager unless either <strong>VM_SYNC_SYNCHRONOUS</strong> or
+<strong>VM_SYNC_ASYNCHRONOUS</strong> is also set.
+<p>
+<dt> <strong>VM_SYNC_SYNCHRONOUS</strong>
+<dd>
+Writes dirty and precious pages back to the memory manager,
+waits for pages to reach backing storage.
+<p>
+<dt> <strong>VM_SYNC_ASYNCHRONOUS</strong>
+<dd>
+Writes dirty and precious pages back to the memory manager,
+returns without waiting for pages to reach backing storage.
+</dl>
+</dl>
+<h3>DESCRIPTION</h3>
+<p>
+The <strong>vm_msync</strong> function synchronizes the contents of
+a memory range with its
+backing store image by flushing or cleaning the contents of the
+specified range
+to the range's memory manager, engaging in a synchronization protocol with
+the manager (<strong>memory_object_synchronize</strong>).
+The client does not return from
+this call until the memory manager responds (to the kernel) with
+<strong>memory_object_synchronize_completed</strong>.
+<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>
+The address is illegal or specifies a non-allocated region.
+</dl>
+<h3>RELATED INFORMATION</h3>
+<p>
+Functions:
+<a href="memory_object_synchronize.html"><strong>memory_object_synchronize</strong></a>,
+<a href="MO_SY_completed.html"><strong>memory_object_synchronize_completed</strong></a>.