Changeset 617 for trunk/src/kernel32/os2native.cpp
- Timestamp:
- Aug 22, 1999, 1:11:11 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/os2native.cpp
r130 r617 1 /* $Id: os2native.cpp,v 1. 4 1999-06-20 12:46:09sandervl Exp $ */1 /* $Id: os2native.cpp,v 1.5 1999-08-22 11:11:10 sandervl Exp $ */ 2 2 3 3 /* … … 52 52 //****************************************************************************** 53 53 LPVOID WIN32API VirtualAlloc(LPVOID lpvAddress, DWORD cbSize, DWORD fdwAllocationType, 54 54 DWORD fdwProtect) 55 55 { 56 56 PVOID Address = lpvAddress; 57 ULONG flag = 0 ;57 ULONG flag = 0, base; 58 58 APIRET rc; 59 59 60 60 dprintf(("VirtualAlloc at %X; %d bytes, fAlloc %d, fProtect %d\n", (int)lpvAddress, cbSize, fdwAllocationType, fdwProtect)); 61 62 if (cbSize > 0x7fc00000) /* 2Gb - 4Mb */ 63 { 64 dprintf(("VirtualAlloc: size too large")); 65 // SetLastError( ERROR_OUTOFMEMORY ); 66 return NULL; 67 } 68 69 if (!(fdwAllocationType & (MEM_COMMIT | MEM_RESERVE)) || 70 (fdwAllocationType & ~(MEM_COMMIT | MEM_RESERVE))) 71 { 72 dprintf(("VirtualAlloc: Invalid parameter")); 73 // SetLastError( ERROR_INVALID_PARAMETER ); 74 return NULL; 75 } 61 76 62 77 if(fdwAllocationType & MEM_COMMIT) { … … 117 132 } 118 133 119 //TODO: Set last error in case rc != 0134 //TODO: Set last error in case rc != 0 120 135 if(rc) { 121 136 dprintf(("DosSetMem returned %d\n", rc)); 137 // SetLastError( ERROR_OUTOFMEMORY ); 122 138 return(NULL); 123 139 }
Note:
See TracChangeset
for help on using the changeset viewer.