diff options
Diffstat (limited to 'sys/kern/subr_param.c')
-rw-r--r-- | sys/kern/subr_param.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index 25927f7..5786e90 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); #define NBUF 0 #endif #ifndef MAXFILES -#define MAXFILES (maxproc * 2) +#define MAXFILES (40 + 32 * maxusers) #endif static int sysctl_kern_vm_guest(SYSCTL_HANDLER_ARGS); @@ -261,6 +261,8 @@ init_param2(long physpages) TUNABLE_INT_FETCH("kern.maxproc", &maxproc); if (maxproc > (physpages / 12)) maxproc = physpages / 12; + if (maxproc > pid_max) + maxproc = pid_max; maxprocperuid = (maxproc * 9) / 10; /* |