diff --git a/exec/main.c b/exec/main.c index 93e122fc..7d73af50 100644 --- a/exec/main.c +++ b/exec/main.c @@ -41,6 +41,8 @@ #include #include #include +#include +#include #include #include #include @@ -841,6 +843,11 @@ return; static void aisexec_mlockall (void) { int res; + struct rlimit rlimit; + + rlimit.rlim_cur = RLIM_INFINITY; + rlimit.rlim_max = RLIM_INFINITY; + setrlimit (RLIMIT_MEMLOCK, &rlimit); res = mlockall (MCL_CURRENT | MCL_FUTURE); if (res == -1) {