summaryrefslogtreecommitdiff
path: root/sys/kern/kern_proc.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-03-23 18:42:07 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-03-23 18:42:07 +0000
commit75cd31da1a0f264658261d0a7aba581b4bff459e (patch)
tree6fd5650ad4e1b92ea6d10c58f5ff24fdeacfb519 /sys/kern/kern_proc.c
parent49b4dc6783233175909e6ba3129a7bb39dd490b7 (diff)
Use pool to allocate processes.
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r--sys/kern/kern_proc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index b8bfac34f4d..5752a4936f7 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_proc.c,v 1.7 2000/06/05 11:02:50 art Exp $ */
+/* $OpenBSD: kern_proc.c,v 1.8 2001/03/23 18:42:06 art Exp $ */
/* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */
/*
@@ -52,6 +52,7 @@
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <sys/signalvar.h>
+#include <sys/pool.h>
/*
* Structure associated with user cacheing.
@@ -75,6 +76,8 @@ u_long pgrphash;
struct proclist allproc;
struct proclist zombproc;
+struct pool proc_pool;
+
/*
* Locking of this proclist is special; it's accessed in a
* critical section of process exit, and thus locking it can't
@@ -106,6 +109,9 @@ procinit()
pidhashtbl = hashinit(maxproc / 4, M_PROC, M_WAITOK, &pidhash);
pgrphashtbl = hashinit(maxproc / 4, M_PROC, M_WAITOK, &pgrphash);
uihashtbl = hashinit(maxproc / 16, M_PROC, M_WAITOK, &uihash);
+
+ pool_init(&proc_pool, sizeof(struct proc), 0, 0, 0, "procpl",
+ 0, pool_page_alloc_nointr, pool_page_free_nointr, M_PROC);
}
/*