Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mremap(2) — UTek 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fmap(2)

getpagesize(2)

mmap(2)

mremap(2)

munmap(2)



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
     Mremap 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 will 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 5/12/88                                                 1





MREMAP(2)               COMMAND REFERENCE               MREMAP(2)



     [EMRANGE]    An area is outside the possible user's address
                  space or includes part of the uarea.

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
     fmap(2), getpagesize(2), mmap(2), mremap(2), and munmap(2).













































Printed 5/12/88                                                 2





































































%%index%%
na:288,82;
sy:370,1340;
de:1710,1668;
di:3378,521;4259,121;
rv:4380,280;
se:4660,258;
%%index%%000000000119

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026