]> granicus.if.org Git - git/commit
mmap(win32): avoid copy-on-write when it is unnecessary
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 22 Apr 2016 14:31:26 +0000 (16:31 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Apr 2016 22:01:15 +0000 (15:01 -0700)
commit7ce7ee2d8228a97f023c7e34488ed83a557d83fb
treecd0abdb9d35986108bcf8fe442bc394b53bfe8d2
parent6a730e10a76d1e03a9554292419201534c1521f1
mmap(win32): avoid copy-on-write when it is unnecessary

Often we are mmap()ing read-only. In those cases, it is wasteful to map in
copy-on-write mode. Even worse: it can cause errors where we run out of
space in the page file.

So let's be extra careful to map files in read-only mode whenever
possible.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/win32mmap.c