Automatically prefault a limited number of mappings to resident pages in
shmat(2), just like mmap(2). MFC after: 5 days Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
59d82a0684
commit
16a3d82ef4
@ -410,9 +410,9 @@ kern_shmat(td, shmid, shmaddr, shmflg)
|
||||
}
|
||||
|
||||
vm_object_reference(shmseg->object);
|
||||
rv = vm_map_find(&p->p_vmspace->vm_map, shmseg->object,
|
||||
0, &attach_va, size, 0, shmaddr != NULL ? VMFS_NO_SPACE :
|
||||
VMFS_OPTIMAL_SPACE, prot, prot, MAP_INHERIT_SHARE);
|
||||
rv = vm_map_find(&p->p_vmspace->vm_map, shmseg->object, 0, &attach_va,
|
||||
size, 0, shmaddr != NULL ? VMFS_NO_SPACE : VMFS_OPTIMAL_SPACE,
|
||||
prot, prot, MAP_INHERIT_SHARE | MAP_PREFAULT_PARTIAL);
|
||||
if (rv != KERN_SUCCESS) {
|
||||
vm_object_deallocate(shmseg->object);
|
||||
error = ENOMEM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user