int mlockall(int flags);
This system call implements the POSIX.1b mlockall function, which locks down all of a program's memory. The flags argument specifies whether to lock down memory the program has already allocated (MCL_CURRENT), memory the program allocates in the future (MCL_FUTURE), or both (MCL_CURRENT | MCL_FUTURE).MOSS currently only supports MCL_FUTURE; attempting to call mlockall with MCL_CURRENT set will cause the DOS extender to panic. (MCL_CURRENT isn't hard to implement; we just haven't done it yet.)
Also, note that munlockall is currently unimplemented.
- flags
- The flags specifying whether to lock down currently allocated memory, memory allocated in the future, or both.
Returns 0 if successful, or -1 on error, in which case errno indicates the error.