Page 1 of 1

File compare locks big files

Posted: 2007-03-06, 15:26 UTC
by samot
If I compare two files (both around 60 MB), the compare locks both files, so that I (or another program) can't write them.

Smaller files are not locked and I'll be asked, if I want to compare them again, if another program has modified them.

It would be nice, if it would work with bigger files too (I wasted several time to find the purpose, why my own (self-written) program did not to, what it shall).

best regards

Thomas

Posted: 2007-03-09, 20:25 UTC
by ghisler(Author)
The difference is that small files are loaded into memory, while large files are just mapped into memory, using the Windows memory mapping functions. Memory-mapped files stay open and therefore remain locked.