summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorart <art@openbsd.org>2002-01-23 15:46:48 +0000
committerart <art@openbsd.org>2002-01-23 15:46:48 +0000
commit0929131739cccefa319bccad922997c6e05c0965 (patch)
tree353536606dddb26a5227cb8d67b560ceedc24500 /sys/kern/kern_exit.c
parentUse sparc64 fpu_extern.h not sparc. (diff)
downloadwireguard-openbsd-0929131739cccefa319bccad922997c6e05c0965.tar.xz
wireguard-openbsd-0929131739cccefa319bccad922997c6e05c0965.zip
Allocate rusage, pgrp, ucred and session with pool.
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 7cb310327b8..a1adcbc52ff 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.38 2002/01/16 20:50:17 miod Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.39 2002/01/23 15:46:48 art Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -118,8 +118,7 @@ exit1(p, rv)
if (p->p_flag & P_PROFIL)
stopprofclock(p);
- MALLOC(p->p_ru, struct rusage *, sizeof(struct rusage),
- M_ZOMBIE, M_WAITOK);
+ p->p_ru = pool_get(&rusage_pool, PR_WAITOK);
/*
* If parent is waiting for us to exit or exec, P_PPWAIT is set; we
* wake up the parent early to avoid deadlock.
@@ -517,7 +516,7 @@ proc_zap(p)
struct proc *p;
{
- FREE(p->p_ru, M_ZOMBIE);
+ pool_put(&rusage_pool, p->p_ru);
/*
* Finally finished with old proc entry.