mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-05-13 07:09:03 +00:00
kobo cheats death again (+1 squashed commits)
Squashed commits: [708e2429] kobo cheats death again
This commit is contained in:
parent
f9f1585a7f
commit
b4dc29f425
10 changed files with 225 additions and 46 deletions
|
|
@ -374,6 +374,7 @@ struct llama_mmap::impl {
|
|||
throw std::runtime_error(format("MapViewOfFile failed: %s", llama_format_win_err(error).c_str()));
|
||||
}
|
||||
|
||||
#ifndef USE_FAILSAFE
|
||||
if (prefetch > 0) {
|
||||
#if _WIN32_WINNT >= 0x602
|
||||
BOOL (WINAPI *pPrefetchVirtualMemory) (HANDLE, ULONG_PTR, PWIN32_MEMORY_RANGE_ENTRY, ULONG);
|
||||
|
|
@ -394,6 +395,9 @@ struct llama_mmap::impl {
|
|||
throw std::runtime_error("PrefetchVirtualMemory unavailable");
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
printf("\nPrefetchVirtualMemory skipped in compatibility mode.\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
void unmap_fragment(size_t first, size_t last) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue