]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/vm_write.html
xnu-792.tar.gz
[apple/xnu.git] / osfmk / man / vm_write.html
CommitLineData
9bccf70c 1<h2>vm_write</h2>\r<hr>\r<p>\r<strong>Function</strong> - Write data to the specified address in the target task's address space.\r<h3>SYNOPSIS</h3>\r<pre>\r<strong>kern_return_t vm_write</strong>\r <strong>(vm_task_t</strong> <var>target_task</var>,\r <strong>vm_address_t</strong> <var>address</var>,\r <strong>pointer_t</strong> <var>data</var>,\r <strong>mach_msg_type_number_t</strong> <var>data_count</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 memory is to be\rwritten.\r<p>\r<dt> <var>address</var> \r<dd>\r[in scalar]\rThe address at which to start the write.\r<p>\r<dt> <var>data</var> \r<dd>\r[pointer to page aligned in array of bytes]\rAn array of data to be\rwritten.\r<p>\r<dt> <var>data_count</var> \r<dd>\r[in scalar]\rThe number of bytes in the array.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>vm_write</strong> function writes an array of data to a\rtask's virtual memory. It\rallows one task to write to another task's memory.\r<p>\rThe result of <strong>vm_write</strong> is as if <var>target_task</var> had directly\rwritten into the set of \rpages. Hence, <var>target_task</var> must have write permission to the pages.\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_PROTECTION_FAILURE</strong>\r<dd>\rSpecified memory is valid, but does not permit writing.\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="vm_copy.html"><strong>vm_copy</strong></a>,\r<a href="vm_protect.html"><strong>vm_protect</strong></a>,\r<a href="vm_read.html"><strong>vm_read</strong></a>,\r<a href="host_page_size.html"><strong>host_page_size</strong></a>.\r