diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-07-03 23:49:14 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-07-03 23:49:14 +0000 |
commit | fad8738511040dfb0760006f087247513c13ec6b (patch) | |
tree | bb0c4d3977bda8ed402c78db665fe408700ba439 /ftpfs/ccache.c | |
parent | 701e4350e3096a2a5b4a3a57d5feee9349e9f305 (diff) |
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
* ccache.c (ccache_read): Use munmap instead of vm_deallocate.
(ccache_invalidate): Likewise.
(ccache_free): Likewise.
* netfs.c (get_dirents): Likewise.
Diffstat (limited to 'ftpfs/ccache.c')
-rw-r--r-- | ftpfs/ccache.c | 11 |
1 files changed, 4 insertions, 7 deletions
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 <miles@gnu.ai.mit.edu> 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) |