diff options
Diffstat (limited to 'src/firejail/rlimit.c')
-rw-r--r-- | src/firejail/rlimit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/firejail/rlimit.c b/src/firejail/rlimit.c index 99127673e..ec5fb3791 100644 --- a/src/firejail/rlimit.c +++ b/src/firejail/rlimit.c | |||
@@ -71,4 +71,16 @@ void set_rlimits(void) { | |||
71 | if (arg_debug) | 71 | if (arg_debug) |
72 | printf("Config rlimit: maximum number of signals pending %llu\n", cfg.rlimit_sigpending); | 72 | printf("Config rlimit: maximum number of signals pending %llu\n", cfg.rlimit_sigpending); |
73 | } | 73 | } |
74 | |||
75 | if (arg_rlimit_as) { | ||
76 | rl.rlim_cur = (rlim_t) cfg.rlimit_as; | ||
77 | rl.rlim_max = (rlim_t) cfg.rlimit_as; | ||
78 | #ifdef HAVE_GCOV | ||
79 | __gcov_dump(); | ||
80 | #endif | ||
81 | if (setrlimit(RLIMIT_AS, &rl) == -1) | ||
82 | errExit("setrlimit"); | ||
83 | if (arg_debug) | ||
84 | printf("Config rlimit: maximum virtual memory %llu\n", cfg.rlimit_as); | ||
85 | } | ||
74 | } | 86 | } |