Changeset 708 for trunk/src/kernel32/mmap.cpp
- Timestamp:
- Aug 26, 1999, 7:56:26 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/mmap.cpp
r707 r708 1 /* $Id: mmap.cpp,v 1.1 5 1999-08-26 15:05:14sandervl Exp $ */1 /* $Id: mmap.cpp,v 1.16 1999-08-26 17:56:25 sandervl Exp $ */ 2 2 3 3 /* … … 190 190 } 191 191 if(mProtFlags & PAGE_READONLY) { 192 //DosSetMem returns flags with EXECUTE bit set, even though the initial allocation is without this bit set! 193 //Also returns access denied when trying to set it back to READONLY 194 VirtualProtect((LPVOID)pageAddr, nrpages*PAGE_SIZE, newProt, &oldProt); 195 // if(VirtualProtect((LPVOID)pageAddr, nrpages*PAGE_SIZE, newProt, &oldProt) == FALSE) { 196 // goto fail; 197 // } 192 if(VirtualProtect((LPVOID)pageAddr, nrpages*PAGE_SIZE, newProt, &oldProt) == FALSE) { 193 goto fail; 194 } 198 195 } 199 196 } … … 256 253 257 254 if(fMapped == FALSE) {//if not mapped, reserve/commit entire view 258 pMapping = VirtualAlloc(0, mSize, fAlloc, memFlags); 255 //SvL: Always read/write access or else ReadFile will crash once we 256 // start decommitting pages. 257 // This is most likely an OS/2 bug and doesn't happen in Aurora 258 // when allocating memory with the PAG_ANY bit set. (without this 259 // flag it will also crash) 260 pMapping = VirtualAlloc(0, mSize, fAlloc, PAGE_READWRITE); 259 261 if(pMapping == NULL) { 260 262 dprintf(("Win32MemMap::mapFileView: VirtualAlloc %x %x %x failed!", mSize, fAlloc, memFlags));
Note:
See TracChangeset
for help on using the changeset viewer.