mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
parent
51722c1fe6
commit
419dc40c4d
@ -13,8 +13,10 @@
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/log.h>
|
||||
#include <libc-plugin/fd_alloc.h>
|
||||
|
||||
/* libc includes */
|
||||
#include <sys/limits.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <stdio.h>
|
||||
@ -32,6 +34,24 @@ extern "C" int __attribute__((weak)) getrlimit(int resource, struct rlimit *rlim
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Maximal size of address space
|
||||
*/
|
||||
if (resource == RLIMIT_AS) {
|
||||
rlim->rlim_cur = LONG_MAX;
|
||||
rlim->rlim_max = LONG_MAX;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Maximum number of file descriptors
|
||||
*/
|
||||
if (resource == RLIMIT_NOFILE) {
|
||||
rlim->rlim_cur = MAX_NUM_FDS;
|
||||
rlim->rlim_max = MAX_NUM_FDS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user