mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 01:24:36 +00:00
reverted the failsafe removal, since they dropped support for dll check
This commit is contained in:
parent
b6914ebd04
commit
e2fd30b5d1
4 changed files with 32 additions and 11 deletions
|
@ -612,6 +612,7 @@ struct llama_mmap {
|
|||
throw std::runtime_error(format("MapViewOfFile failed: %s", llama_format_win_err(error).c_str()));
|
||||
}
|
||||
|
||||
#ifndef USE_FAILSAFE
|
||||
#if _WIN32_WINNT >= _WIN32_WINNT_WIN8
|
||||
if (prefetch) {
|
||||
// Advise the kernel to preload the mapped memory
|
||||
|
@ -626,6 +627,9 @@ struct llama_mmap {
|
|||
#else
|
||||
#pragma message("warning: You are building for pre-Windows 8; prefetch not supported")
|
||||
#endif // _WIN32_WINNT >= _WIN32_WINNT_WIN8
|
||||
#else
|
||||
printf("\nPrefetchVirtualMemory skipped in compatibility mode.\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
~llama_mmap() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue