Changeset 21587 for trunk/src/kernel32/virtual.cpp
- Timestamp:
- Mar 4, 2011, 11:08:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/virtual.cpp
r21361 r21587 722 722 if(rc==487) 723 723 { 724 dprintf(("VirtualQuery - OSLibDosQueryMem %x %x returned %d, REMOVING ERROR!\n", 725 lpBase, cbLength, rc)); 726 SetLastError(0); 727 return 0; 724 // On OS/2, ERROR_INVALID_ADDRESS (478) is returned for unallocated or 725 // freed private memory (for unallocated shared memory DosQueryMem 726 // succeeds with PAG_FREE). However on Windows (per MSDN), VirtualQuery 727 // succeeds with MEM_FREE for any address that is within the addressable 728 // space of the process. Provide a rough simulation here. 729 730 dprintf(("WARNING: VirtualQuery: OSLibDosQueryMem(0x%08X,%d) returned %d, " 731 "returning MEM_FREE for one page!", 732 lpBase, cbLength, rc)); 733 734 memset(pmbiBuffer, 0, sizeof(MEMORY_BASIC_INFORMATION)); 735 pmbiBuffer->BaseAddress = lpBase; 736 pmbiBuffer->RegionSize = 0x1000; 737 pmbiBuffer->State = MEM_FREE; 738 return sizeof(MEMORY_BASIC_INFORMATION); 728 739 } 729 740 if(rc)
Note:
See TracChangeset
for help on using the changeset viewer.