summaryrefslogtreecommitdiff
path: root/ext2fs/pager.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-11 05:27:35 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-11 05:27:35 +0000
commitb84e750c4abc10e5e1fb066abf1757b1ea42315e (patch)
tree0fd15665b342fa7da7cd95c771935c5f18553dc7 /ext2fs/pager.c
parent601c2121002d89a651d94038483f0aae82ebb924 (diff)
1999-07-06 Thomas Bushnell, BSG <tb@mit.edu>
* dir.c (diskfs_get_directs): Use mmap instead of vm_allocate. * hyper.c (allocate_mod_map): Likewise. (get_hypermetadata): Likewise. * pager.c (get_page_buf): Likewise. * hyper.c (diskfs_readonly_changed): Use mprotect instead of vm_protect.
Diffstat (limited to 'ext2fs/pager.c')
-rw-r--r--ext2fs/pager.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index 6cdb7786..1ccc0154 100644
--- a/ext2fs/pager.c
+++ b/ext2fs/pager.c
@@ -87,9 +87,8 @@ get_page_buf ()
{
error_t err;
spin_unlock (&free_page_bufs_lock);
- err = vm_allocate (mach_task_self (),
- (vm_address_t *)&buf, vm_page_size, 1);
- if (err)
+ buf = mmap (0, vm_page_size, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
+ if (buf == (void *) -1)
buf = 0;
}
else