From 9db1a6bef5a0f7d3a0ed80a1367649bbaae02e2a Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sat, 3 Jul 1999 23:48:40 +0000 Subject: 1999-07-03 Thomas Bushnell, BSG * core.c (core_dump_task): Use munmap instead of vm_deallocate, when it's from our own task. * elfcore.c: Likewise. * exec.c (load_section): Likewise. (map): Likewise. (close_exec_stream): Likewise. (finish_mapping): Likewise. (load): Likewise. (do_exec): Likewise. (S_exec_setexecdata): Likewise. * hashexec.c (check_hashbang): Likewise. * main.c (deadboot): Likewise. --- exec/hashexec.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'exec/hashexec.c') diff --git a/exec/hashexec.c b/exec/hashexec.c index 9f7a8e43..dabd7c00 100644 --- a/exec/hashexec.c +++ b/exec/hashexec.c @@ -408,21 +408,18 @@ check_hashbang (struct execdata *e, task_resume (oldtask); /* Our caller suspended it. */ mach_port_deallocate (mach_task_self (), oldtask); if (! argv_copy) - vm_deallocate (mach_task_self (), (vm_address_t) argv, argvlen); + munmap (argv, argvlen); if (! envp_copy) - vm_deallocate (mach_task_self (), (vm_address_t) envp, envplen); + munmap (envp, envplen); for (i = 0; i < dtablesize; ++i) mach_port_deallocate (mach_task_self (), dtable[i]); if (! dtable_copy) - vm_deallocate (mach_task_self (), (vm_address_t) dtable, - dtablesize * sizeof *dtable); + munmap (dtable, dtablesize * sizeof *dtable); for (i = 0; i < nports; ++i) mach_port_deallocate (mach_task_self (), portarray[i]); if (! portarray_copy) - vm_deallocate (mach_task_self (), (vm_address_t) portarray, - nports * sizeof *portarray); + munmap (portarray, nports * sizeof *portarray); if (! intarray_copy) - vm_deallocate (mach_task_self (), (vm_address_t) intarray, - nints * sizeof *intarray); + munmap (intarray, nints * sizeof *intarray); } } -- cgit v1.2.3