Changeset 16464 in vbox
- Timestamp:
- Feb 2, 2009 2:53:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
r14824 r16464 744 744 { 745 745 /* 746 * Flush dcache (required?) and protect against fork. 746 * Flush dcache (required?), protect against fork and _really_ pin the page 747 * table entries. get_user_pages() will protect against swapping out the 748 * pages but it will NOT protect against removing page table entries. This 749 * can be achieved with 750 * - using mlock / mmap(..., MAP_LOCKED, ...) from userland. This requires 751 * an appropriate limit set up with setrlimit(..., RLIMIT_MEMLOCK, ...). 752 * Usual Linux distributions support only a limited size of locked pages 753 * (e.g. 32KB). 754 * - setting the PageReserved bit (as we do in rtR0MemObjLinuxAllocPages() 755 * or by 756 * - setting the VM_LOCKED flag. This is the same as doing mlock() without 757 * a range check. 747 758 */ 748 759 /** @todo The Linux fork() protection will require more work if this API … … 751 762 { 752 763 flush_dcache_page(pMemLnx->apPages[rc]); 753 papVMAs[rc]->vm_flags |= VM_DONTCOPY;764 papVMAs[rc]->vm_flags |= (VM_DONTCOPY | VM_LOCKED); 754 765 } 755 766
Note:
See TracChangeset
for help on using the changeset viewer.

