diff options
-rw-r--r-- | libpager/ChangeLog | 10 | ||||
-rw-r--r-- | libpager/data-return.c | 7 | ||||
-rw-r--r-- | libpager/object-terminate.c | 4 | ||||
-rw-r--r-- | libpager/pagemap.c | 4 | ||||
-rw-r--r-- | libpager/pager-memcpy.c | 6 | ||||
-rw-r--r-- | libpager/pager.h | 4 |
6 files changed, 22 insertions, 13 deletions
diff --git a/libpager/ChangeLog b/libpager/ChangeLog index 141cf04d..a760e0e1 100644 --- a/libpager/ChangeLog +++ b/libpager/ChangeLog @@ -1,3 +1,13 @@ +1999-07-03 Thomas Bushnell, BSG <tb@mit.edu> + + * data-return.c (_pager_do_write_request): Use munmap instead of + vm_deallocate. + * object-terminate.c (_pager_free_structure): Likewise. + * pagemap.c (_pager_pagemap_resize): Likewise. + * pager-memcpy.c (pager_memcpy): Likewise. + + * pager.h (pager_write_page): Doc adjustment. + Wed Aug 20 14:47:38 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * pager.h: Doc fix. diff --git a/libpager/data-return.c b/libpager/data-return.c index 562af955..9f107793 100644 --- a/libpager/data-return.c +++ b/libpager/data-return.c @@ -1,5 +1,5 @@ /* Implementation of memory_object_data_return for pager library - Copyright (C) 1994, 1995, 1996 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1999 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -171,9 +171,8 @@ _pager_do_write_request (mach_port_t object, vm_page_size, 1, VM_PROT_NONE, 0, MACH_PORT_NULL); else - vm_deallocate (mach_task_self (), - data + (vm_page_size * i), - vm_page_size); + munmap ((caddr_t) (data + (vm_page_size * i)), + vm_page_size); pm_entries[i] &= ~(PM_PAGINGOUT | PM_PAGEINWAIT); } diff --git a/libpager/object-terminate.c b/libpager/object-terminate.c index 4057789f..4315cbbb 100644 --- a/libpager/object-terminate.c +++ b/libpager/object-terminate.c @@ -1,5 +1,5 @@ /* Implementation of memory_object_terminate for pager library - Copyright (C) 1994, 1995, 1996 Free Software Foundation + Copyright (C) 1994, 1995, 1996, 1999 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -124,7 +124,7 @@ _pager_free_structure (struct pager *p) /* Free the pagemap */ if (p->pagemapsize) { - vm_deallocate (mach_task_self (), (u_int)p->pagemap, p->pagemapsize); + munmap (p->pagemap, p->pagemapsize); p->pagemapsize = 0; p->pagemap = 0; } diff --git a/libpager/pagemap.c b/libpager/pagemap.c index 9fefc63f..459f854f 100644 --- a/libpager/pagemap.c +++ b/libpager/pagemap.c @@ -1,5 +1,5 @@ /* Pagemap manipulation for pager library - Copyright (C) 1994, 1997 Free Software Foundation + Copyright (C) 1994, 1997, 1999 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -35,7 +35,7 @@ _pager_pagemap_resize (struct pager *p, vm_address_t off) if (! err) { bcopy (p->pagemap, newaddr, p->pagemapsize); - vm_deallocate (mach_task_self (), (u_int)p->pagemap, p->pagemapsize); + munmap (p->pagemap, p->pagemapsize); p->pagemap = newaddr; p->pagemapsize = newsize; } diff --git a/libpager/pager-memcpy.c b/libpager/pager-memcpy.c index fe9876de..9e53f7d6 100644 --- a/libpager/pager-memcpy.c +++ b/libpager/pager-memcpy.c @@ -1,5 +1,5 @@ /* Fault-safe copy into or out of pager-backed memory. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. Written by Roland McGrath. This program is free software; you can redistribute it and/or @@ -46,7 +46,7 @@ pager_memcpy (struct pager *pager, memory_object_t memobj, if (window) /* Deallocate the old window. */ - vm_deallocate (mach_task_self (), window, windowsize); + munmap ((caddr_t) window, windowsize); /* Map in and copy a standard-sized window, unless that is more than the total left to be copied. */ @@ -93,7 +93,7 @@ pager_memcpy (struct pager *pager, memory_object_t memobj, ©, (sighandler_t) &fault); if (window) - vm_deallocate (mach_task_self (), window, windowsize); + munmap ((caddr_t) window, windowsize); *size -= to_copy; diff --git a/libpager/pager.h b/libpager/pager.h index cec7f8e7..d3f1162c 100644 --- a/libpager/pager.h +++ b/libpager/pager.h @@ -1,5 +1,5 @@ /* Definitions for multi-threaded pager library - Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997, 1999 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -159,7 +159,7 @@ pager_read_page (struct user_pager_info *pager, int *write_lock); /* The user must define this function. For pager PAGER, synchronously - write one page from BUF to offset PAGE. In addition, vm_deallocate + write one page from BUF to offset PAGE. In addition, mfree (or equivalent) BUF. The only permissable error returns are EIO, EDQUOT, and ENOSPC. */ error_t |