diff options
| author | Mike Silbersack <silby@FreeBSD.org> | 2002-03-07 04:50:36 +0000 |
|---|---|---|
| committer | Mike Silbersack <silby@FreeBSD.org> | 2002-03-07 04:50:36 +0000 |
| commit | 77a7d074e4cc27702d8fd47734764f2431ccbdaa (patch) | |
| tree | c7509b8470d0b9f6904679d68250757ad7885696 /sys/kern/subr_param.c | |
| parent | 74acd9bb58fdf699dfe579a36f5a415c558902e2 (diff) | |
Notes
Diffstat (limited to 'sys/kern/subr_param.c')
| -rw-r--r-- | sys/kern/subr_param.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index d9eb2c7dd59b..8c2e4c6ffafb 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -149,6 +149,12 @@ init_param2(int physpages) */ maxproc = NPROC; TUNABLE_INT_FETCH("kern.maxproc", &maxproc); + /* + * Limit maxproc so that kmap entries cannot be exhausted by + * processes. + */ + if (maxproc > (physpages / 12)) + maxproc = physpages / 12; maxfiles = MAXFILES; TUNABLE_INT_FETCH("kern.maxfiles", &maxfiles); maxprocperuid = (maxproc * 9) / 10; |
