diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-07-03 23:54:41 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-07-03 23:54:41 +0000 |
commit | beb095bf383cf3fcee8efeb3ca06231515bba673 (patch) | |
tree | 3f712e48ec7fb5e2d571ef250d1d9df3642cb6d9 /proc/info.c | |
parent | 3d107d5b12ac76a37621e589ebc03540205b488f (diff) |
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
* info.c (get_string): Use munmap instead of vm_deallocate.
(get_vector): Likewise.
(get_string_array): Likewise.
(S_proc_getprocinfo): Likewise.
* mgt.c (S_proc_reauthenticate): Likewise.
(S_proc_dostop): Likewise.
(add_tasks): Likewise.
Diffstat (limited to 'proc/info.c')
-rw-r--r-- | proc/info.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/proc/info.c b/proc/info.c index a53df08a..17fba079 100644 --- a/proc/info.c +++ b/proc/info.c @@ -177,7 +177,7 @@ get_string (task_t t, c - (char *)(data + (addr - readaddr))); } - vm_deallocate (mach_task_self (), data, readlen); + munmap ((caddr_t) data, readlen); return err; } @@ -232,7 +232,7 @@ get_vector (task_t task, /* If we didn't find the null terminator, then we will loop to read an additional page. */ scanned = data + readlen; - vm_deallocate (mach_task_self (), data, readlen); + munmap ((caddr_t) data, readlen); } while (!err && *vec == NULL); return err; @@ -266,7 +266,7 @@ get_string_array (task_t t, { free (vector); if (*buf != origbuf) - vm_deallocate (mach_task_self (), *buf, *buflen); + munmap ((caddr_t) *buf, *buflen); return err; } @@ -286,14 +286,14 @@ get_string_array (task_t t, free (string); free (vector); if (*buf != origbuf) - vm_deallocate (mach_task_self (), *buf, *buflen); + munmap ((caddr_t) *buf, *buflen); return err; } bcopy (*(char **) buf, (char *) newbuf, prev_len); bp = (char *)newbuf + prev_len; if (*buf != origbuf) - vm_deallocate (mach_task_self (), *buf, *buflen); + munmap ((caddr_t) *buf, *buflen); *buf = newbuf; *buflen = newsize; @@ -530,8 +530,7 @@ S_proc_getprocinfo (struct proc *callerp, if (waits_used > 0) bcopy (*waits, new_waits, waits_used); if (*waits_len > 0 && waits_alloced) - vm_deallocate (mach_task_self (), - (vm_address_t)*waits, *waits_len); + munmap (*waits, *waits_len); *waits = new_waits; *waits_len = new_len; waits_alloced = 1; @@ -552,14 +551,11 @@ S_proc_getprocinfo (struct proc *callerp, } if (*flags & PI_FETCH_THREADS) - { - vm_deallocate (mach_task_self (), - (vm_address_t)thds, nthreads * sizeof (thread_t)); - } + munmap (thds, nthreads * sizeof (thread_t)); if (err && pi_alloced) - vm_deallocate (mach_task_self (), (u_int) *piarray, structsize); + munmap (*piarray, structsize); if (err && waits_alloced) - vm_deallocate (mach_task_self (), (vm_address_t)*waits, *waits_len); + munmap (*waits, *waits_len); else *waits_len = waits_used; |