MREMAP(2) COMMAND REFERENCE MREMAP(2) NAME mremap - remap pages of memory SYNOPSIS #include <sys/types.h> #include <sys/mman.h> mremap(fromaddr, toaddr, len, prot) caddrt fromaddr, toaddr; uint len, prot; DESCRIPTION The mremap utility causes the process pages starting at fromaddr and continuing for len bytes to be mapped to the address toaddr. The parameter prot specifies the accessibility and condition of the newly mapped pages. Accessibility is specified using the same protection flags that were used to originally map the region (see mmap(2)). Condition is determined by an additional flag which may be or'ed into prot. M_RELEASE_ZFILL release page resources and set to "zero-fill-on-demand" If neither of these flags is present in prot, then the original contents of the pages in the mapping are maintained intact. Neither of the condition flags have any effect on a shared mapping. The facility provided by the condition flags is more efficient than invoking munmap(2) to release the resources and mmap(2) to reallocate them. An additional condition flag may be or'ed into prot to eliminate the need to reestablish the permissions when moving or releasing a mapping. M_PREVIOUS use the existing permissions The fromaddr, toaddr, and len parameters must be multiples of the system page size (obtained with the getpagesize(2) call), which may be larger than the underlying hardware page size. DIAGNOSTICS [EINVAL] An address is not on a cluster boundary or len is not positive. [EPERM] The area of the object to be mapped is protected against the desired operation. [EMCOLLIDE] Portions of the new area are already mapped. This check is made as if the old area were gone, so overlapping moves work. Printed 4/6/89 1
MREMAP(2) COMMAND REFERENCE MREMAP(2) [EMRANGE] An area is outside the possible user's address space or includes part of the area. RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. SEE ALSO getpagesize(2), mmap(2), and munmap(2). Printed 4/6/89 2
%%index%% na:288,82; sy:370,1340; de:1710,1683; di:3393,521;4274,120; rv:4394,280; se:4674,214; %%index%%000000000119