mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-31 12:13:10 +00:00
Stop using vm_allocate and vm_deallocate.
This commit is contained in:
parent
ff16eeefb0
commit
a1e5cf9de7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6572
@ -38,7 +38,7 @@
|
||||
* from: Utah $Hdr: vm_unix.c 1.1 89/11/07$
|
||||
*
|
||||
* @(#)vm_unix.c 8.1 (Berkeley) 6/11/93
|
||||
* $Id: vm_unix.c,v 1.3 1994/08/02 07:55:41 davidg Exp $
|
||||
* $Id: vm_unix.c,v 1.4 1995/01/09 16:05:59 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -79,14 +79,14 @@ obreak(p, uap, retval)
|
||||
if (swap_pager_full) {
|
||||
return (ENOMEM);
|
||||
}
|
||||
rv = vm_allocate(&vm->vm_map, &old, diff, FALSE);
|
||||
rv = vm_map_find(&vm->vm_map, NULL, 0, &old, diff, FALSE);
|
||||
if (rv != KERN_SUCCESS) {
|
||||
return (ENOMEM);
|
||||
}
|
||||
vm->vm_dsize += btoc(diff);
|
||||
} else if (diff < 0) {
|
||||
diff = -diff;
|
||||
rv = vm_deallocate(&vm->vm_map, new, diff);
|
||||
rv = vm_map_remove(&vm->vm_map, new, new + diff);
|
||||
if (rv != KERN_SUCCESS) {
|
||||
return (ENOMEM);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user