From fad8738511040dfb0760006f087247513c13ec6b Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sat, 3 Jul 1999 23:49:14 +0000 Subject: 1999-07-03 Thomas Bushnell, BSG * ccache.c (ccache_read): Use munmap instead of vm_deallocate. (ccache_invalidate): Likewise. (ccache_free): Likewise. * netfs.c (get_dirents): Likewise. --- ftpfs/ccache.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'ftpfs/ccache.c') diff --git a/ftpfs/ccache.c b/ftpfs/ccache.c index c942378a..98b568ae 100644 --- a/ftpfs/ccache.c +++ b/ftpfs/ccache.c @@ -1,6 +1,6 @@ /* Remote file contents caching - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 1999 Free Software Foundation, Inc. Written by Miles Bader This file is part of the GNU Hurd. @@ -126,9 +126,7 @@ ccache_read (struct ccache *cc, off_t offs, size_t len, void *data) /* That worked; copy what's already-fetched. */ { bcopy (cc->image, (void *)addr, cc->max); - vm_deallocate (mach_task_self (), - (vm_address_t)cc->image, - cc->alloced); + munmap (cc->image, cc->alloced); cc->image = (char *)addr; } } @@ -227,8 +225,7 @@ ccache_invalidate (struct ccache *cc) { if (cc->alloced > 0) { - vm_deallocate (mach_task_self (), - (vm_address_t)cc->image, cc->alloced); + munmap (cc->image, cc->alloced); cc->image = 0; cc->alloced = 0; cc->max = 0; @@ -277,7 +274,7 @@ void ccache_free (struct ccache *cc) { if (cc->alloced > 0) - vm_deallocate (mach_task_self (), (vm_address_t)cc->image, cc->alloced); + munmap (cc->image, cc->alloced); if (cc->data_conn >= 0) close (cc->data_conn); if (cc->conn) -- cgit v1.2.3