diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-07-03 23:51:49 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-07-03 23:51:49 +0000 |
commit | d8f2d7d71da7a39b7a70866d834658b1a090eb38 (patch) | |
tree | 40cfd46d9688bee71ccf85c2915ea2626a399f24 | |
parent | b393ef99cfca111589793d0cf469184cc149918b (diff) |
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
* common.h (VMFREE): Use munmap instead of vm_deallocate.
* procstat.c (merge_procinfo): Likewise.
-rw-r--r-- | libps/ChangeLog | 5 | ||||
-rw-r--r-- | libps/common.h | 4 | ||||
-rw-r--r-- | libps/procstat.c | 6 |
3 files changed, 9 insertions, 6 deletions
diff --git a/libps/ChangeLog b/libps/ChangeLog index a810dbbb..129a9a29 100644 --- a/libps/ChangeLog +++ b/libps/ChangeLog @@ -1,3 +1,8 @@ +1999-07-03 Thomas Bushnell, BSG <tb@mit.edu> + + * common.h (VMFREE): Use munmap instead of vm_deallocate. + * procstat.c (merge_procinfo): Likewise. + 1999-06-02 Roland McGrath <roland@baalperazim.frob.com> * ps.h (PSTAT_ENV): New macro. diff --git a/libps/common.h b/libps/common.h index 67d89bfd..abc04682 100644 --- a/libps/common.h +++ b/libps/common.h @@ -1,6 +1,6 @@ /* Handy common functions for things in libps. - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995, 1999 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -32,7 +32,7 @@ ((type *)realloc((void *)(old),(unsigned)(sizeof(type)*(len)))) #define FREE(x) (void)free((void *)x) -#define VMFREE(x, len) vm_deallocate(mach_task_self(), (vm_address_t)x, len) +#define VMFREE(x, len) munmap((caddr_t)x, len) #ifndef FALSE #define FALSE 0 diff --git a/libps/procstat.c b/libps/procstat.c index 8b120bd8..46058e07 100644 --- a/libps/procstat.c +++ b/libps/procstat.c @@ -235,8 +235,7 @@ merge_procinfo (struct proc_stat *ps, ps_flags_t need, ps_flags_t have) /* We got new memory vm_alloced by the getprocinfo, discard the old. */ { if (ps->proc_info_vm_alloced) - vm_deallocate (mach_task_self (), - (vm_address_t)ps->proc_info, ps->proc_info_size); + munmap (ps->proc_info, ps->proc_info_size); else free (ps->proc_info); ps->proc_info = new_pi; @@ -254,8 +253,7 @@ merge_procinfo (struct proc_stat *ps, ps_flags_t need, ps_flags_t have) /* We got new memory vm_alloced by the getprocinfo, discard the old. */ { if (ps->thread_waits_vm_alloced) - vm_deallocate (mach_task_self (), - (vm_address_t)ps->thread_waits, ps->thread_waits_len); + munmap (ps->thread_waits, ps->thread_waits_len); else free (ps->thread_waits); ps->thread_waits = new_waits; |