NAME
vm_write - allows a task’s memory to be written by
another task
SYNOPSIS
#include <mach.h>
kern_return_t
vm_write(target_task, address, data, data_count)
vm_task_t target_task;
vm_address_t address;
pointer_t data;
int data_count;
ARGUMENTS
target_task Task whose memory is to be written.
address Starting address in task
to be affected (must be a
page boundary).
data An array of bytes to be written.
data_count The size of the data
array (must be an integral
number of pages).
DESCRIPTION
vm_write allows a task’s virtual memory to be written
by another
task. Use vm_page_size or vm_statistics to find out the
virtual
page size.
DIAGNOSTICS
KERN_SUCCESS Memory written.
KERN_INVALID_ARGUMENT Either the
address does not start on
a page boundary or the size is not an
integral number of pages.
KERN_PROTECTION_FAILURE The
address region in the target task
is protected against writing.
KERN_INVALID_ADDRESS Illegal or
non_allocated address
specified or there is not data_count
of allocated memory starting at
address.
SEE ALSO
vm_copy(2), vm_protect(2), vm_read(2), vm_statistics(2)