From: Ivan Komarov Date: Tue, 18 Apr 2023 01:15:50 +0000 (+0200) Subject: Do not close file after mmap (Windows version) (#1034) X-Git-Tag: gguf-v0.4.0~934 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=42747220b4cac548b6e3059b66b3e960b517cfa4;p=pkg%2Fggml%2Fsources%2Fllama.cpp Do not close file after mmap (Windows version) (#1034) --- diff --git a/llama_util.h b/llama_util.h index ee9b2a6f..eba14656 100755 --- a/llama_util.h +++ b/llama_util.h @@ -202,7 +202,6 @@ struct llama_mmap { HANDLE hMapping = CreateFileMappingA(hFile, NULL, PAGE_READONLY, 0, 0, NULL); DWORD error = GetLastError(); - CloseHandle(hFile); if (hMapping == NULL) { throw format("CreateFileMappingA failed: %s", llama_format_win_err(error).c_str());