*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: munlockall | Section: 3 | Source: Digital UNIX | File: munlockall.3.gz
mlockall(3) Library Functions Manual mlockall(3) NAME mlockall, munlockall - Lock or unlock all of a specified process's pages into memory (P1003.1b) SYNOPSIS #include <sys/mman.h> int mlockall ( int flags); int munlockall (void); PARAMETERS flags The flags argument determines whether the pages to be locked are those currently mapped by the process's address space, those that will be mapped in the future, or both. The flags ar- gument is constructed as the OR of one or more of the con- stants, MCL_CURRENT or MCL_FUTURE, as defined in the <mman.h> header file. DESCRIPTION The mlockall function causes all of the pages mapped by the process's address space to be memory resident until unlocked by a call to the munlockall function, until the process exits, or until the process calls exec. MCL_CURRENT locks all of the pages currently mapped into the process's address space. MCL_FUTURE locks all of the pages that be- come mapped into the process's address space in the future, when those mappings are established. You can specify MCL_CURRENT and then subse- quently specify MCL_FUTURE to lock both current and future address space. The munlockall function unlocks all currently mapped pages of the process's address space. Any pages that become mapped into a process's address space after a call to munlockall are not locked unless other- wise specified by a subsequent call to mlockall. Pages locked or mapped into another process's address space are unaffected by this process's call to the munlockall function. A lock is not inherited across a fork. All memory locks established on an address by this process are removed if an address range associated with the lock is unmapped with a call to the munmap function. You must have superuser privileges to call the mlockall function. RETURN VALUES On a successful call to the mlockall function, a value of 0 is returned and memory is locked. On an unsuccessful call, a value of -1 is re- turned, no memory is locked, and errno is set to indicate that an error occurred. On a successful call to the munlockall function, a value of 0 is re- turned and memory is unlocked. On an unsuccessful call, a value of -1 is returned and errno is set to indicate that an error occurred. ERRORS The mlockall and munlockall functions fail under the following condi- tions: [ENOSYS] The implementation does not support this memory locking interface. If any of the following conditions occur, the mlockall function will fail: [EAGAIN] Some or all of the memory identified by the operation could not be locked when the call was made. [EINVAL] The flags argument is zero, or includes unimplemented flags [ENOMEM] Locking all of the pages currently mapped into the process's address space would exceed an implementation- defined limit on the amount of memory that the process may lock. [EPERM] The calling process does not have the appropriate privi- lege to perform the requested operation. RELATED INFORMATION Functions: exec(2), _exit(2), fork(2), munmap(2) delim off mlockall(3)

Navigation Options