Re: Switching from CVS to GIT
- From
- Brian Dessent <brian@dessent.net>
- Date
- Oct 15, 2007, 00:36 UTC
- Message-ID
- <4712B616.165BBF8D@dessent.net>
- In-Reply-To
- <Pine.LNX.4.64.0710150039120.25221@racer.site>
Johannes Schindelin wrote:
Show 6 quoted lines
> The problem is that on Windows, you cannot keep a file open and delete it > at the same time. This is an issue in Windows' equivalent of VFS. > > A neat trick to work with temporary files without permission issues is to > open the file and delete it right after that. This does not work on > Windows.
You can achieve the same thing on Windows with CreateFile() by setting the dwShareMode parameter to zero and setting the FILE_FLAG_DELETE_ON_CLOSE attribute on dwFlagsAndAttributes. This results in a file that cannot be opened or read by any other process and that will be automatically deleted when all open handles are closed.
> I think Alex means this: you can have C:\a\b\c and D:\a\b\c. So depending > on which drive you are, you mean one or the other. Just comparing the > paths is not enough.
This just means that you have to consider the drive letter as part of the filename.
Show 5 quoted lines
> > > - no real "mmap" (which kills perfomance and complicates code) > > > > You only need mmap because you are accustomed to use it on GNU/Linux. > > Yes. And we rely on the performance very much.
Windows may not call it mmap() but it most certainly has memory-mapped file IO: <http://msdn2.microsoft.com/en-us/library/aa366781.aspx#file_mapping_functions>.
Brian