From 1584a9200a511a6ce330917be8dcaf957bb7c2e2 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sat, 3 Jul 1999 23:53:01 +0000 Subject: 1999-07-03 Thomas Bushnell, BSG * bunzip2.c (bunzip2): Use munmap instead of vm_deallocate. (store_bunzip2_create): Likewise. * rdwr.c (store_read): Likewise. * gunzip.c (gunzip): Likewise. (store_gunzip_create): Likewise. * enc.c (store_enc_dealloc): Likewise. * copy.c (copy_cleanup): Likewise. --- libstore/rdwr.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'libstore/rdwr.c') diff --git a/libstore/rdwr.c b/libstore/rdwr.c index 4b3cf84f..27c2916d 100644 --- a/libstore/rdwr.c +++ b/libstore/rdwr.c @@ -1,6 +1,6 @@ /* Store I/O - Copyright (C) 1995, 96, 97, 98 Free Software Foundation, Inc. + Copyright (C) 1995, 96, 97, 98, 1999 Free Software Foundation, Inc. Written by Miles Bader This file is part of the GNU Hurd. @@ -211,8 +211,7 @@ store_read (struct store *store, if (seg_buf != buf_end) { bcopy (seg_buf, buf_end, seg_buf_len); - vm_deallocate (mach_task_self (), - (vm_address_t)seg_buf, seg_buf_len); + munmap (seg_buf, seg_buf_len); } buf_end += seg_buf_len; amount -= seg_buf_len; @@ -261,16 +260,12 @@ store_read (struct store *store, if (whole_buf != *buf) { if (err) - vm_deallocate (mach_task_self (), - (vm_address_t)whole_buf, whole_buf_len); + munmap (whole_buf, whole_buf_len); else { vm_size_t unused = whole_buf_len - round_page (*len); if (unused) - vm_deallocate (mach_task_self (), - (vm_address_t)whole_buf + whole_buf_len - - unused, - unused); + munmap (whole_buf + whole_buf_len - unused, unused); *buf = whole_buf; } } -- cgit v1.2.3