summaryrefslogtreecommitdiff
path: root/storeio/dev.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-03 23:54:54 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-03 23:54:54 +0000
commite143ce039d54acb4bdfcd84f95dcf554d4a84d6a (patch)
treeeb099b3bf7c37a2d9a7a5f6dc11e735fe3c7059c /storeio/dev.c
parentbeb095bf383cf3fcee8efeb3ca06231515bba673 (diff)
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
* dev.c (dev_buf_fill): Use munmap instead of vm_deallocate. (dev_close): Likewise. (dev_read): Likewise. * pager.c (pager_write_page): Likewise.
Diffstat (limited to 'storeio/dev.c')
-rw-r--r--storeio/dev.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/storeio/dev.c b/storeio/dev.c
index 30828556..cab344c1 100644
--- a/storeio/dev.c
+++ b/storeio/dev.c
@@ -88,8 +88,7 @@ dev_buf_fill (struct dev *dev, off_t offs)
if (buf != dev->buf)
{
- vm_deallocate (mach_task_self (),
- (vm_address_t)dev->buf, store->block_size);
+ munmap (dev->buf, store->block_size);
dev->buf = buf;
}
@@ -188,8 +187,7 @@ dev_close (struct dev *dev)
dev_buf_discard (dev);
- vm_deallocate (mach_task_self (),
- (vm_address_t)dev->buf, dev->store->block_size);
+ munmap (dev->buf, dev->store->block_size);
}
store_free (dev->store);
@@ -414,8 +412,7 @@ dev_read (struct dev *dev, off_t offs, size_t whole_amount,
/* Copy from wherever the read put it. */
{
bcopy (req_buf, _req_buf, req_len);
- vm_deallocate (mach_task_self (),
- (vm_address_t)req_buf, req_len);
+ munmap (req_buf, req_len);
}
*amount = req_len;
}
@@ -443,7 +440,7 @@ dev_read (struct dev *dev, off_t offs, size_t whole_amount,
err = dev_rw (dev, offs, whole_amount, len, buf_read, raw_read);
if (err && allocated_buf)
- vm_deallocate (mach_task_self (), (vm_address_t)*buf, whole_amount);
+ munmap (*buf, whole_amount);
return err;
}