diff options
Diffstat (limited to 'os-posix.c')
-rw-r--r-- | os-posix.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -363,3 +363,15 @@ bool is_daemonized(void) { return daemonize; } + +int os_mlock(void) +{ + int ret = 0; + + ret = mlockall(MCL_CURRENT | MCL_FUTURE); + if (ret < 0) { + perror("mlockall"); + } + + return ret; +} |