vm_mmap.c (acd3428b7d3e94cef0e1881c868cb4b131d4ff41) | vm_mmap.c (222d01951f8677015e3e96c6950e809c0d983c09) |
---|---|
1/*- 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1991, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department. --- 960 unchanged lines hidden (view full) --- 969 PROC_LOCK(proc); 970 if (ptoa(npages + 971 pmap_wired_count(vm_map_pmap(&proc->p_vmspace->vm_map))) > 972 lim_cur(proc, RLIMIT_MEMLOCK)) { 973 PROC_UNLOCK(proc); 974 return (ENOMEM); 975 } 976 PROC_UNLOCK(proc); | 1/*- 2 * Copyright (c) 1988 University of Utah. 3 * Copyright (c) 1991, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department. --- 960 unchanged lines hidden (view full) --- 969 PROC_LOCK(proc); 970 if (ptoa(npages + 971 pmap_wired_count(vm_map_pmap(&proc->p_vmspace->vm_map))) > 972 lim_cur(proc, RLIMIT_MEMLOCK)) { 973 PROC_UNLOCK(proc); 974 return (ENOMEM); 975 } 976 PROC_UNLOCK(proc); |
977 if (npages + cnt.v_wire_count > vm_page_max_wired) | 977 if (npages + VMCNT_GET(wire_count) > vm_page_max_wired) |
978 return (EAGAIN); 979 error = vm_map_wire(&proc->p_vmspace->vm_map, start, end, 980 VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); 981 return (error == KERN_SUCCESS ? 0 : ENOMEM); 982} 983 984#ifndef _SYS_SYSPROTO_H_ 985struct mlockall_args { --- 442 unchanged lines hidden --- | 978 return (EAGAIN); 979 error = vm_map_wire(&proc->p_vmspace->vm_map, start, end, 980 VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES); 981 return (error == KERN_SUCCESS ? 0 : ENOMEM); 982} 983 984#ifndef _SYS_SYSPROTO_H_ 985struct mlockall_args { --- 442 unchanged lines hidden --- |