diff options
Diffstat (limited to 'libshouldbeinlibc/portxlate.c')
-rw-r--r-- | libshouldbeinlibc/portxlate.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/libshouldbeinlibc/portxlate.c b/libshouldbeinlibc/portxlate.c index 07b2fc03..087e0850 100644 --- a/libshouldbeinlibc/portxlate.c +++ b/libshouldbeinlibc/portxlate.c @@ -1,6 +1,6 @@ /* Translate mach port names between two tasks - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1999 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -59,12 +59,8 @@ port_name_xlator_create (mach_port_t from_task, mach_port_t to_task, } else { - vm_deallocate (mach_task_self (), - (vm_address_t)x->to_names, - x->to_names_len * sizeof (mach_port_t)); - vm_deallocate (mach_task_self (), - (vm_address_t)x->to_types, - x->to_types_len * sizeof (mach_port_type_t)); + munmap (x->to_names, x->to_names_len * sizeof (mach_port_t)); + munmap (x->to_types, x->to_types_len * sizeof (mach_port_type_t)); err = ENOMEM; } } @@ -88,12 +84,8 @@ port_name_xlator_free (struct port_name_xlator *x) mach_port_deallocate (mach_task_self (), x->ports[i]); free (x->ports); - vm_deallocate (mach_task_self (), - (vm_address_t)x->to_names, - x->to_names_len * sizeof (mach_port_t)); - vm_deallocate (mach_task_self (), - (vm_address_t)x->to_types, - x->to_types_len * sizeof (mach_port_type_t)); + munmap (x->to_names, x->to_names_len * sizeof (mach_port_t)); + munmap (x->to_types, x->to_types_len * sizeof (mach_port_type_t)); mach_port_deallocate (mach_task_self (), x->to_task); mach_port_deallocate (mach_task_self (), x->from_task); |