summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpager/ChangeLog4
-rw-r--r--libpager/pagemap.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/libpager/ChangeLog b/libpager/ChangeLog
index 47c93342..268f9ddb 100644
--- a/libpager/ChangeLog
+++ b/libpager/ChangeLog
@@ -3,6 +3,10 @@
* priv.h: Add #include <sys/mman.h> for munmap decl.
* pager-memcpy.c: Likewise.
+1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * pagemap.c (_pager_pagemap_resize): Use mmap instead of vm_allocate.
+
1999-07-03 Thomas Bushnell, BSG <tb@mit.edu>
* data-return.c (_pager_do_write_request): Use munmap instead of
diff --git a/libpager/pagemap.c b/libpager/pagemap.c
index 459f854f..c6d924c7 100644
--- a/libpager/pagemap.c
+++ b/libpager/pagemap.c
@@ -31,7 +31,8 @@ _pager_pagemap_resize (struct pager *p, vm_address_t off)
void *newaddr;
int newsize = round_page (off);
- err = vm_allocate (mach_task_self (), (u_int *)&newaddr, newsize, 1);
+ newaddr = mmap (0, newsize, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
+ err = (newaddr == (void *) -1) ? errno : 0;
if (! err)
{
bcopy (p->pagemap, newaddr, p->pagemapsize);