Re: Cygwin can't handle huge packfiles?
- From
- Christopher Faylor <me@cgf.cx>
- Date
- Apr 5, 2006, 21:08 UTC
- Message-ID
- <20060405210844.GN26780@trixie.casa.cgf.cx>
- In-Reply-To
- <Pine.LNX.4.63.0604051612200.25304@wbgn013.biozentrum.uni-wuerzburg.de>
On Wed, Apr 05, 2006 at 04:14:20PM +0200, Johannes Schindelin wrote:
Show 11 quoted lines
>> Inspired by a patch of Alex Riesen (thanks, Alex), I tried to use the >> regular mmap for mapping pack files, only to discover that I compile >> without defining "NO_MMAP", so I've been using the stock mmap all >> along. So now I'm thinking that the cygwin mmap also does a >> malloc-and-read, just like git does with NO_MMAP. So I'll continue to >> investigate in that direction. > >I think cygwin's mmap() is based on the Win32 API equivalent, which could >mean that it *is* memory mapped, but in a special area (which is smaller >than 1.5 gigabyte). In this case, it would make sense to limit the pack >size, thereby having several packs, and mmap() them as they are needed.
Yes, cygwin's mmap uses CreateFileMapping and MapViewOfFile. IIRC, Windows might have a 2G limitation lurking under the hood somewhere but I think that might be tweakable with some registry setting.
cgf