| 207 | FoundContiguousPages = FALSE; |
| 208 | break; |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | if (!FoundContiguousPages) |
| 213 | { |
| 214 | i++; |
| 215 | continue; |
| 216 | } |
| 217 | |
| 218 | for (ULONG_PTR j = 0; j < PagesPerRegion; j++) |
| 219 | { |
| 220 | XwpPhysicalPages[i + j] = true; |
| 221 | PageArray[PagesAllocated++] = i + j; |
| 222 | } |
| 223 | |
| 224 | i += PagesPerRegion; |
| 225 | } |
| 226 | |
| 227 | ReleaseSRWLockExclusive(&XwpPhysicalMemoryLock); |
| 228 | *NumberOfPages = PagesAllocated; |
| 229 | SetLastError(PagesAllocated > 0 ? ERROR_SUCCESS : ERROR_OUTOFMEMORY); |
| 230 | return PagesAllocated > 0; |
nothing calls this directly
no test coverage detected