Re: [PATCH 2/3] mmap(win32): avoid copy-on-write when it is unnecessary

2016-04-28 Thread Johannes Schindelin
Hi Hannes, On Wed, 27 Apr 2016, Johannes Sixt wrote: > Am 27.04.2016 um 08:43 schrieb Johannes Schindelin: > > On Tue, 26 Apr 2016, Johannes Sixt wrote: > > > Should we insert a check for MAP_PRIVATE to catch > > > unexpected use-cases (think of the index-helper daemon effort)? > > > > I agree, w

Re: [PATCH 2/3] mmap(win32): avoid copy-on-write when it is unnecessary

2016-04-27 Thread Johannes Sixt
Am 27.04.2016 um 08:43 schrieb Johannes Schindelin: On Tue, 26 Apr 2016, Johannes Sixt wrote: Should we insert a check for MAP_PRIVATE to catch unexpected use-cases (think of the index-helper daemon effort)? I agree, we should have such a check. The line above the `die("Invalid usage ...")` th

Re: [PATCH 2/3] mmap(win32): avoid copy-on-write when it is unnecessary

2016-04-26 Thread Johannes Schindelin
Hi Hannes, On Tue, 26 Apr 2016, Johannes Sixt wrote: > Am 22.04.2016 um 16:31 schrieb Johannes Schindelin: > > 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. > > > >

Re: [PATCH 2/3] mmap(win32): avoid copy-on-write when it is unnecessary

2016-04-26 Thread Johannes Sixt
Am 22.04.2016 um 16:31 schrieb Johannes Schindelin: 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 possibl

[PATCH 2/3] mmap(win32): avoid copy-on-write when it is unnecessary

2016-04-22 Thread Johannes Schindelin
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 --- compat/wi