Changeset 8882 for trunk/src/kernel32/oslibmem.cpp
- Timestamp:
- Jul 16, 2002, 10:16:48 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibmem.cpp
r8877 r8882 1 /* $Id: oslibmem.cpp,v 1. 3 2002-07-15 14:28:52sandervl Exp $ */1 /* $Id: oslibmem.cpp,v 1.4 2002-07-16 08:16:47 sandervl Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 94 94 //Allocate memory aligned at 64kb boundary 95 95 //****************************************************************************** 96 DWORD OSLibDosAllocMem(LPVOID *lplpMemAddr, DWORD cbSize, DWORD flFlags )96 DWORD OSLibDosAllocMem(LPVOID *lplpMemAddr, DWORD cbSize, DWORD flFlags, BOOL fLowMemory) 97 97 { 98 98 PVOID pvMemAddr; 99 99 DWORD offset; 100 100 APIRET rc; 101 101 BOOL fMemFlags = flAllocMem; 102 103 //Override low/high memory flag if necessary 104 if(fLowMemory) { 105 fMemFlags = 0; 106 } 102 107 /* 103 108 * Let's try use the extended DosAllocMem API of Win32k.sys. … … 105 110 if (libWin32kInstalled()) 106 111 { 107 rc = DosAllocMemEx(lplpMemAddr, cbSize, flFlags | f lAllocMem| OBJ_ALIGN64K);112 rc = DosAllocMemEx(lplpMemAddr, cbSize, flFlags | fMemFlags | OBJ_ALIGN64K); 108 113 if (rc != ERROR_NOT_SUPPORTED) /* This call was stubbed until recently. */ 109 114 return rc; … … 114 119 */ 115 120 116 rc = DosAllocMem(&pvMemAddr, cbSize, flFlags | f lAllocMem);121 rc = DosAllocMem(&pvMemAddr, cbSize, flFlags | fMemFlags); 117 122 if(rc) { 118 123 dprintf(("!ERROR!: DosAllocMem failed with rc %d", rc)); … … 128 133 129 134 //Allocate 64kb more so we can round the address to a 64kb aligned value 130 rc = DosAllocMem((PPVOID)&addr64kb, cbSize + 64*1024, (flFlags & ~PAG_COMMIT) | f lAllocMem);135 rc = DosAllocMem((PPVOID)&addr64kb, cbSize + 64*1024, (flFlags & ~PAG_COMMIT) | fMemFlags); 131 136 if(rc) { 132 137 dprintf(("!ERROR!: DosAllocMem failed with rc %d", rc));
Note:
See TracChangeset
for help on using the changeset viewer.