Changeset 2098 for Whitix/branches/netchannel/memory/mmap.c
- Timestamp:
- 05/27/10 13:45:58 (2 years ago)
- Files:
-
- 1 modified
-
Whitix/branches/netchannel/memory/mmap.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/netchannel/memory/mmap.c
r2084 r2098 108 108 /* So no luck finding it in the VNode's mapping list - read it in */ 109 109 newPage=PageAlloc(); 110 110 111 111 if (!newPage) 112 112 return -ENOMEM; 113 113 114 VirtMemMapPage(address, newPage->physAddr, 115 area->protection | PAGE_ACCESSED | PAGE_SHARED); 114 DWORD tempAddr = VirtAllocateTemp(newPage->physAddr); 116 115 117 116 /* Add to shared list so other read-only pages can map this page */ … … 123 122 VmLockPage(mappedPage); 124 123 ListAdd(&mappedPage->list, &area->vNode->sharedList); 124 125 125 if (area->vNode->fileOps->mMap) 126 ret =area->vNode->fileOps->mMap(area->vNode, address, offset);126 ret = area->vNode->fileOps->mMap(area->vNode, tempAddr, offset); 127 127 else 128 ret=FileGenericReadPage(address,area->vNode,offset); 128 ret = FileGenericReadPage(tempAddr, area->vNode,offset); 129 130 VirtUnmapPhysPage(tempAddr); 131 132 VirtMemMapPage(address, newPage->physAddr, 133 area->protection); 129 134 130 135 VmUnlockPage(mappedPage);
