From 0f3b1a1fd2f4cdb2ad800c92858ffe64c6d3e294 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sun, 11 Jul 1999 05:30:24 +0000 Subject: 1999-07-09 Thomas Bushnell, BSG * pagemap.c (_pager_pagemap_resize): Use mmap instead of vm_allocate. --- libpager/ChangeLog | 4 ++++ libpager/pagemap.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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 for munmap decl. * pager-memcpy.c: Likewise. +1999-07-09 Thomas Bushnell, BSG + + * pagemap.c (_pager_pagemap_resize): Use mmap instead of vm_allocate. + 1999-07-03 Thomas Bushnell, BSG * 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); -- cgit v1.2.3