delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/10/04:54:08

X-Spam-Check-By: sourceware.org
Date: Wed, 10 Jan 2007 10:53:45 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.0 CVS mmap failure
Message-ID: <20070110095345.GL23638@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <Pine DOT CYG DOT 4 DOT 58 DOT 0701041715140 DOT 3520 AT PC1163-8460-XP DOT flightsafety DOT com> <20070105095752 DOT GB28768 AT calimero DOT vinschen DOT de> <Pine DOT CYG DOT 4 DOT 58 DOT 0701050959060 DOT 2704 AT PC1163-8460-XP DOT flightsafety DOT com> <Pine DOT CYG DOT 4 DOT 58 DOT 0701051054010 DOT 280 AT PC1163-8460-XP DOT flightsafety DOT com> <Pine DOT CYG DOT 4 DOT 58 DOT 0701051144030 DOT 2880 AT PC1163-8460-XP DOT flightsafety DOT com> <20070105182234 DOT GC12776 AT calimero DOT vinschen DOT de> <Pine DOT CYG DOT 4 DOT 58 DOT 0701051237090 DOT 2880 AT PC1163-8460-XP DOT flightsafety DOT com> <20070105192302 DOT GD12776 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
In-Reply-To: <20070105192302.GD12776@calimero.vinschen.de>
User-Agent: Mutt/1.4.2.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Jan  5 20:23, Corinna Vinschen wrote:
> On Jan  5 12:42, Brian Ford wrote:
> > On Fri, 5 Jan 2007, Corinna Vinschen wrote:
> > So, it does indeed look taken.
> 
> Too bad.
> 
> > > Actually this shows a problem in the mmap implementation with respect to
> > > MEM_TOP_DOWN.  I think, what mmap should actually do is to create a
> > > lightweight MAP_RESERVE anonymous mapping of the whole requested mapping
> > > size, then close it again and then reopen it with the address it got
> > > in this first try.  This would probably ensure that the subsequent two
> > > mapping will work.
> > 
> > I don't know what mmap magic Cygwin uses internally to do this, but can't
> > you just map the big region, then overmap the disk file without the map,
> > unmap, remap, remap?
> 
> "overmap"?  -v please?

Since overmapping doesn't work on Windows, unfortunately, I implemented
the above mentioned technique, which isn't much code anyway.  It
reserves a memory lot big enough to fit in the whole mapping, memorizes
the address, free's the memory again and then uses the new address in
the subsequent real mappings.

This should work (knock on wood) on all systems now.  My testcases still
work on my 512 MB machine, so I'd appreciate if you could give the latest
snapshot a try on /3GB enabled machines.


Corinna


-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019