llama.cpp
llama.cpp copied to clipboard
llama-mmap: use MAP_PRIVATE instead of MAP_SHARED
It is not intended to write data to the file for others to read.
No, thats a terrible idea. MAP_PRIVATE requires the kernel to reserve space for the file in its overcommit total, as the kernel might need to find the ram/swap to store the entire file, if the process with the map decides to write to every page in the file. This change would thus break llamacpp in cases where there is overcommit/memory pressure