diff options
Diffstat (limited to 'sys/vm/vm_glue.c')
-rw-r--r-- | sys/vm/vm_glue.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 8ac0dde..5638175 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -209,7 +209,7 @@ vsunlock(addr, len) * to user mode to avoid stack copying and relocation problems. */ void -vm_fork(p1, p2, flags) +vm_forkproc(p1, p2, flags) struct proc *p1, *p2; int flags; { @@ -286,6 +286,22 @@ vm_fork(p1, p2, flags) } /* + * Called after process has been wait(2)'ed apon and is being reaped. + * The idea is to reclaim resources that we could not reclaim while + * the process was still executing. + */ +void +vm_waitproc(p) + struct proc *p; +{ + + GIANT_REQUIRED; + cpu_wait(p); + pmap_dispose_proc(p); /* drop per-process resources */ + vmspace_free(p->p_vmspace); /* and clean-out the vmspace */ +} + +/* * Set default limits for VM system. * Called for proc 0, and then inherited by all others. * |