Changeset 876 in vbox for trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
- Timestamp:
- Feb 13, 2007 2:53:17 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r387 r876 724 724 unsigned cPages = pMem->cb >> PAGE_SHIFT; 725 725 unsigned long pv = (unsigned long)pMem->pvR3; 726 struct vm_area_struct **papVMAs; 726 727 727 728 /* … … 730 731 papPages = vmalloc(cPages * sizeof(*papPages)); 731 732 if (!papPages) 733 return SUPDRV_ERR_NO_MEMORY; 734 735 /* 736 * Allocate the VMA pointer array. 737 */ 738 papVMAs = vmalloc(cPages * sizeof(*papVMAs)); 739 if (!papVMAs) 732 740 return SUPDRV_ERR_NO_MEMORY; 733 741 … … 743 751 0, /* force. */ 744 752 papPages, /* Page array. */ 745 NULL);/* vmas */753 papVMAs); /* vmas */ 746 754 if (rc != cPages) 747 755 { … … 759 767 760 768 /* 761 * Get addresses .769 * Get addresses, protect against fork() 762 770 */ 763 771 for (iPage = 0; iPage < cPages; iPage++) … … 765 773 paPages[iPage].Phys = page_to_phys(papPages[iPage]); 766 774 paPages[iPage].uReserved = 0; 767 } 775 papVMAs[iPage]->vm_flags |= VM_DONTCOPY; 776 } 777 778 vfree(papVMAs); 768 779 769 780 dprintf2(("supdrvOSLockMemOne: pvR3=%p cb=%d papPages=%p\n",
Note:
See TracChangeset
for help on using the changeset viewer.