4 <strong>Function
</strong> - Write data to the specified address in the target task's address space.
7 <strong>kern_return_t vm_write
</strong>
8 <strong>(vm_task_t
</strong> <var>target_task
</var>,
9 <strong>vm_address_t
</strong> <var>address
</var>,
10 <strong>pointer_t
</strong> <var>data
</var>,
11 <strong>mach_msg_type_number_t
</strong> <var>data_count
</var><strong>);
</strong>
16 <dt> <var>target_task
</var>
19 The port for the task whose memory is to be
22 <dt> <var>address
</var>
25 The address at which to start the write.
29 [pointer to page aligned in array of bytes]
30 An array of data to be
33 <dt> <var>data_count
</var>
36 The number of bytes in the array.
40 The
<strong>vm_write
</strong> function writes an array of data to a
41 task's virtual memory. It
42 allows one task to write to another task's memory.
44 The result of
<strong>vm_write
</strong> is as if
<var>target_task
</var> had directly
45 written into the set of
46 pages. Hence,
<var>target_task
</var> must have write permission to the pages.
49 This interface is machine word length specific because of the virtual address
51 <h3>RETURN VALUES
</h3>
54 <dt> <strong>KERN_PROTECTION_FAILURE
</strong>
56 Specified memory is valid, but does not permit writing.
58 <dt> <strong>KERN_INVALID_ADDRESS
</strong>
60 The address is illegal or specifies a non-allocated region.
62 <h3>RELATED INFORMATION
</h3>
65 <a href=
"vm_copy.html"><strong>vm_copy
</strong></a>,
66 <a href=
"vm_protect.html"><strong>vm_protect
</strong></a>,
67 <a href=
"vm_read.html"><strong>vm_read
</strong></a>,
68 <a href=
"host_page_size.html"><strong>host_page_size
</strong></a>.