1<assertions> 2 <assertion id="1" tag="ref:XSH6:{System Interfaces:mlockall:DESCRIPTION}"> 3 The mlockall() function shall cause all of the pages mapped by the address 4 space of a process to be memory-resident until unlocked or until the process 5 exits or execs another process image 6 </assertion> 7 <assertion id="2" tag="ref:XSH6:{System Interfaces:mlockall:DESCRIPTION}"> 8 The flags argument is constructed from the bitwise-inclusive OR of one or 9 more of the folowing symbolic constants, defined in sys/mman.h: 10 MCL_CURRENT 11 MCL_FUTURE 12 </assertion> 13 <assertion id="3" tag="ref:XSH6:{System Interfaces:mlockall:DESCRIPTION}"> 14 When the MCL_CURRENT flag is set, mlockall lock all of the pages currently 15 mapped into the address space of the process 16 </assertion> 17 <assertion id="4" tag="ref:XSH6:{System Interfaces:mlockall:DESCRIPTION}"> 18 When the MCL_FUTURE flag is set, mlockall lock all of the pages that become 19 mapped into the address space of the process in the future, when those 20 mappings are established 21 </assertion> 22 <assertion id="5" tag="ref:XSH6:{System Interfaces:mlockall:DESCRIPTION}"> 23 If MCL_FUTURE is specified, and the automatic locking of future mappings 24 eventually causes the amount of locked memory to exceed the amount of 25 available physical memory or any other implementation-defined limit, the 26 behavior is implementation-defined. The manner in which the implementation 27 informs the application of these situations is also implementation-defined 28 </assertion> 29 <assertion id="6" tag="ref:XSH6:{System Interfaces:mlockall:DESCRIPTION}"> 30 Upon successful return from the mlockall() function that specifies 31 MCL_CURRENT, all currently mapped pages of the process' address space shall 32 be memory-resident and locked 33 </assertion> 34 <assertion id="7" tag="ref:XSH6:{System Interfaces:mlockall:DESCRIPTION}"> 35 The appropriate privilege is required to lock process memory with mlockall() 36 </assertion> 37 <assertion id="8" tag="ref:XSH6:{System Interfaces:mlockall:RETURN VALUE}"> 38 Upon successful completion, the mlockall() function shall return a value of 39 zero 40 </assertion> 41 <assertion id="9" tag="ref:XSH6:{System Interfaces:mlockall:RETURN VALUE}"> 42 Upon unsuccessful completion, the mlockall() function shall return a value 43 of -1 44 </assertion> 45 <assertion id="10" tag="ref:XSH6:{System Interfaces:mlockall:RETURN VALUE}"> 46 Upon unsuccessful completion, no additional memory shall be locked 47 </assertion> 48 <assertion id="11" tag="ref:XSH6:{System Interfaces:mlockall:RETURN VALUE}"> 49 The effect of failure of mlockall() on previously existing locks in the 50 address space is unspecified 51 </assertion> 52 <assertion id="12" tag="ref:XSH6:{System Interfaces:mlockall:ERRORS}"> 53 The mlockall() function shall set errno = EAGAIN if some or all of the 54 memory identified by the operation could not be locked when the call was 55 made 56 </assertion> 57 <assertion id="13" tag="ref:XSH6:{System Interfaces:mlockall:ERRORS}"> 58 The mlockall() function shall set errno = EINVAL if the flags argument is 59 zero, or includes unimplemented flags 60 </assertion> 61 <assertion id="14" tag="ref:XSH6:{System Interfaces:mlockall:ERRORS}"> 62 The mlockall() function may set errno = ENOMEM if locking all of the pages 63 currently mapped into the address space of the process would exceed an 64 implementation-defined limit on the amount of memory that the process may 65 lock 66 </assertion> 67 <assertion id="15" tag="ref:XSH6:{System Interfaces:mlockall:ERRORS}"> 68 The mlockall() function may set errno = EPERM if the calling process does 69 not have the appropriate privilege to perform the requested operation 70 </assertion> 71</assertions> 72