Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mlockall(3C) — svr4 — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fork(2)

memcntl(2)

mlock(3C)

mmap(2)

plock(2)

sysconf(3C)



MLOCKALL(3C-SVR4)   RISC/os Reference Manual    MLOCKALL(3C-SVR4)



NAME
     mlockall, munlockall - lock or unlock address space

SYNOPSIS
     #include <sys/mman.h>

     int mlockall(int flags);
     int munlockall(void);

DESCRIPTION
     The function mlockall causes all pages mapped by an address
     space to be locked in memory.  The effect of mlockall(flags)
     is equivalent to:

          memcntl(0, 0, MC_LOCKAS, flags, 0, 0)

     The value of flags determines whether the pages to be locked
     are those currently mapped by the address space, those that
     will be mapped in the future, or both:

                MCL_CURRENT   Lock current mappings
                MCL_FUTURE    Lock future mappings

     The function munlockall removes address space locks and
     locks on mappings in the address space.  The effect of mun-
     lockall is equivalent to:
          memcntl(0, 0, MC_UNLOCKAS, 0, 0, 0)


     Locks established with mlockall are not inherited by a child
     process after a fork(2) and are not nested.

SEE ALSO
     fork(2), memcntl(2), mlock(3C), mmap(2), plock(2),
     sysconf(3C).

DIAGNOSTICS
     Upon successful completion, the functions mlockall and  mun-
     lockall return 0; otherwise, they return -1 and set errno to
     indicate the error.

NOTES
     Use of mlockall and munlockall requires that the  user  have
     appropriate privileges.











                        Printed 11/19/92                   Page 1



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