Skip to content

Commit

Permalink
Do not close file after mmap (Windows version) (ggerganov#1034)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfyz authored Apr 18, 2023
1 parent e9298af commit 4274722
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion llama_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 4274722

Please sign in to comment.