From 1d4b687ee6dd3cc8ca9fc2a45e8226b971ab0ce3 Mon Sep 17 00:00:00 2001 From: Howard Su Date: Tue, 4 Jul 2023 18:16:04 +0800 Subject: [PATCH] Fix Linux --- llama-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama-util.h b/llama-util.h index 351ee611a..43b6f05ad 100644 --- a/llama-util.h +++ b/llama-util.h @@ -175,7 +175,7 @@ struct llama_mmap { llama_mmap(struct llama_file * file, size_t prefetch = (size_t) -1 /* -1 = max value */, bool numa = false) { size = file->size; int fd = fileno(file->fp); - int flags = MAP_SHARED; + int flags = MAP_PRIVATE; // prefetch/readahead impairs performance on NUMA systems if (numa) { prefetch = 0; } #ifdef __linux__