VMAP(2V) GENIX Programmer's Manual VMAP(2V)
NAME
vmap - perform various mapping operations
SYNOPSIS
vmap(function, addr1, addr2, pid)
char *addr1;
char *addr2;
DESCRIPTION
Vmap performs various memory mapping functions, depending on the
value of function. The arguments addr1 and addr2 are page
addresses, so that the lower 10 bits of the addresses are ignored
(pages are 1024 bytes in size).
When the value of function is 0, the memory page located at the
address specified by addr1 (addr2 and pid are unused) is removed.
The memory page can be a text, data, or stack page. Any further
reference to the page will create a page of zeroes, if the address
is legal (within the text, data, or stack segments).
When the value of function is 1, a page of the process specified by
pid is copied into the current process. The address of the page
being copied is specified by addr2. The page is copied into the
current process at the address specified by addr1. If the specified
source page is illegal or nonexistent, a page of zeroes is returned.
This function is restricted to the super-user. Ps and w use this
function to obtain the command arguments for other processes.
SEE ALSO
vspy(2V), vlock(2V)
DIAGNOSTICS
Zero is returned if the call was successful. -1 is returned if any
of the arguments are illegal or if the user is not privileged.
BUGS
Many desired functions are missing. This call is temporary and will
be changed or superceded in the future. This call is only imple-
mented in GENIX.
Printed 11/16/83 1