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__