From: Geert Bosch Date: Mon, 17 Jul 2006 19:37:06 GMT Subject: Re: comparing file contents in is_exact_match? Message-ID: <1F90D448-5347-4CEB-80DE-3CC86C1CC16F@adacore.com> In-Reply-To: On Jul 17, 2006, at 12:05, Johannes Schindelin wrote: >> Not for pack-files, though. You may have a half-gigabyte pack- >> file, and >> only use a small small fraction of it. > > Right. > >> (You also never really rename them, so windows should be fine for >> that >> case) > > So we could introduce a second mmap() which is normally the same as > mmap(), except for windows, where it is a rename() and unlink() safe > version of mmap() by reading the thing into RAM. Not very pretty. Or we can avoid doing an mmap of the entire pack file, and instead try to be somewhat smart on limiting the size of the mmap's. This might be sufficient to help Windows and also solve the issue of finding contiguous address space for large packs on 32-bit systems. -Geert