PrefetchVirtualMemory is called dynamically so remove the preprocessor
This commit is contained in:
parent
b1b2f75473
commit
e8119ef670
1 changed files with 0 additions and 4 deletions
|
@ -1801,7 +1801,6 @@ struct llama_mmap {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prefetch > 0) {
|
if (prefetch > 0) {
|
||||||
#if _WIN32_WINNT >= 0x602
|
|
||||||
// PrefetchVirtualMemory is only present on Windows 8 and above, so we dynamically load it
|
// PrefetchVirtualMemory is only present on Windows 8 and above, so we dynamically load it
|
||||||
BOOL (WINAPI *pPrefetchVirtualMemory) (HANDLE, ULONG_PTR, PWIN32_MEMORY_RANGE_ENTRY, ULONG);
|
BOOL (WINAPI *pPrefetchVirtualMemory) (HANDLE, ULONG_PTR, PWIN32_MEMORY_RANGE_ENTRY, ULONG);
|
||||||
HMODULE hKernel32 = GetModuleHandleW(L"kernel32.dll");
|
HMODULE hKernel32 = GetModuleHandleW(L"kernel32.dll");
|
||||||
|
@ -1819,9 +1818,6 @@ struct llama_mmap {
|
||||||
llama_format_win_err(GetLastError()).c_str());
|
llama_format_win_err(GetLastError()).c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
throw std::runtime_error("PrefetchVirtualMemory unavailable");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue