delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/05/11:02:38

X-Spam-Check-By: sourceware.org
Date: Fri, 5 Jan 2007 08:02:15 -0800
From: Christopher Layne <clayne AT anodized DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.0 CVS mmap failure
Message-ID: <20070105160215.GA5674@ns1.anodized.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>
Mime-Version: 1.0
In-Reply-To: <20070105095752.GB28768@calimero.vinschen.de>
User-Agent: Mutt/1.5.11
X-Assp-Spam-Prob: 0.00000
X-Assp-Whitelisted: Yes
X-Assp-Envelope-From: clayne AT ns1 DOT anodized DOT com
X-Assp-Intended-For: cygwin AT cygwin DOT com
X-IsSubscribed: yes
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

While this also passes on mine - mmap has been performing
strangely for me also (since around November snapshots).

SPECIFICALLY: After the "allocate downwards" change was done,
mmap calls started returning ENOMEM ("Cannot allocate memory")
where they worked before just fine. I specifically noticed in
only in one threaded application of mine but was unable to
create a test case that could duplicate it - so I haven't
really posted up the issue either.

I will also say this, I only get ENOMEM if mmap() tries to
map a file LESS than the system page size. That is what I
can duplicate everytime. Once it rises above the pagesize,
then mmap() has no issues. The actual manifestation of failure
is MAP_FAILED returned from mmap(). 

While his test case may have passed for the both of us, there
is definitely something funky going on with mmap() since the
allocate downwards change was OR'd into the underlying
VirtualAlloc() call.

-cl

On Fri, Jan 05, 2007 at 10:57:52AM +0100, Corinna Vinschen wrote:
> On Jan  4 17:17, Brian Ford wrote:
> > $ uname -a
> > CYGWIN_NT-5.1 PC1163-8460-XP 1.7.0(0.161/4/2) 2007-01-04 15:51 i686
> > unknown unknown Cygwin
> > 
> > $ ./mmaptest.exe
> > CloseHandle(fh_disk_file.get_handle ()) 0x738 failed void* mmap64(void*,
> > size_t, int, int, int, _off64_t):1275, Win32 error 6
> > mmap: Cannot allocate memory
> > 
> > STC attached.  Thanks.
> 
> Hmm, STCs are nice, but this STC works fine for me, reproducibly:
> 
> $ ./mmaptest
> test passed
> 
> Something's missing in the picture...

--
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