diff options
-rw-r--r-- | libpager/demuxer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libpager/demuxer.c b/libpager/demuxer.c index 4c406602..4e3f5d1e 100644 --- a/libpager/demuxer.c +++ b/libpager/demuxer.c @@ -20,6 +20,9 @@ #include <mach/mig_errors.h> #include <pthread.h> #include <string.h> +#include <sys/resource.h> +#include <errno.h> +#include <stdio.h> #include "priv.h" #include "memory_object_S.h" @@ -316,9 +319,14 @@ pager_start_workers (struct port_bucket *pager_bucket, int i; pthread_t t; struct pager_requests *requests; + struct rlimit limits = { RLIM_INFINITY, RLIM_INFINITY }; assert_backtrace (out_requests != NULL); + /* Lift default address space limits if we are allowed */ + if (setrlimit (RLIMIT_AS, &limits) == -1 && errno != EPERM) + perror ("error lifting address space limits"); + requests = malloc (sizeof *requests); if (requests == NULL) { |