summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/init_main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 8af998125d8..82931441834 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.95 2002/05/27 13:42:16 itojun Exp $ */
+/* $OpenBSD: init_main.c,v 1.96 2002/11/22 09:50:08 deraadt Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -175,6 +175,7 @@ main(framep)
register struct pdevinit *pdev;
struct timeval rtv;
register int i;
+ quad_t lim;
int s;
register_t rval[2];
extern struct pdevinit pdevinit[];
@@ -287,10 +288,10 @@ main(framep)
limit0.pl_rlimit[RLIMIT_NOFILE].rlim_max = MIN(NOFILE_MAX,
(maxfiles - NOFILE > NOFILE) ? maxfiles - NOFILE : NOFILE);
limit0.pl_rlimit[RLIMIT_NPROC].rlim_cur = MAXUPRC;
- i = ptoa(uvmexp.free);
- limit0.pl_rlimit[RLIMIT_RSS].rlim_max = i;
- limit0.pl_rlimit[RLIMIT_MEMLOCK].rlim_max = i;
- limit0.pl_rlimit[RLIMIT_MEMLOCK].rlim_cur = i / 3;
+ lim = ptoa(uvmexp.free);
+ limit0.pl_rlimit[RLIMIT_RSS].rlim_max = lim;
+ limit0.pl_rlimit[RLIMIT_MEMLOCK].rlim_max = lim;
+ limit0.pl_rlimit[RLIMIT_MEMLOCK].rlim_cur = lim / 3;
limit0.p_refcnt = 1;
/* Allocate a prototype map so we have something to fork. */