[darcs-users] Using Darcs for large projects

Peter Strand peter at zarquon.se
Fri Jun 18 14:45:55 UTC 2004


David Roundy wrote:
> It does.  I believe there isn't any mmap support in the windows build,
> which will make a huge difference if the files in your repo are reasonably
> big (as oppposed to there just being many of them).  There was an attempt
> at mmap support in windows, but I believe it was broken, probably mostly
> because windows has different semantics from POSIX in this regard--I seem
> to recall that if you delete a file which is mmapped you mess things up
> (unlike on POSIX systems).  Can someone correct me if I'm wrong about this?
> (since I've not worked on windows myself)

The problem is that opened or mapped files cannot be removed, and since
it is the finalizer for FastPackedString that unmaps, we don't know
when it is possible to delete the file.

I don't really know how to solve it, unless we can live with manually
"freeing" FastPackedStrings, or using a

  withMMapFilePS :: FilePath -> (PackedString -> IO a) -> IO a

or keep track of files which should be removed and do it later, when we
know it is possible, or some other dirty hack..


How often does darcs want to mmap files that might get removed?


/Peter





More information about the darcs-users mailing list