kobo cheats death again (+1 squashed commits)

Squashed commits:

[708e2429] kobo cheats death again
This commit is contained in:
Concedo 2025-01-04 00:49:04 +08:00
parent f9f1585a7f
commit b4dc29f425
10 changed files with 225 additions and 46 deletions

View file

@ -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) {