delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/12/14/16:56:53

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <4762FCCD.6030804@4raccoons.com>
Date: Fri, 14 Dec 2007 13:59:41 -0800
From: Wayne Christopher <wayne AT 4raccoons DOT com>
User-Agent: Thunderbird 1.5.0.4 (X11/20060516)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: mmap failing
References: <47616D31 DOT 7090002 AT 4raccoons DOT com> <20071213175934 DOT GB25863 AT calimero DOT vinschen DOT de> <476185AF DOT 5000906 AT 4raccoons DOT com> <20071214111508 DOT GD25863 AT calimero DOT vinschen DOT de> <20071214134147 DOT GG25863 AT calimero DOT vinschen DOT de> <20071214135239 DOT GJ25863 AT calimero DOT vinschen DOT de> <ba40711f0712140634u6c5d268fxfb49544d5b6927ba AT mail DOT gmail DOT com> <20071214172454 DOT GL25863 AT calimero DOT vinschen DOT de>
In-Reply-To: <20071214172454.GL25863@calimero.vinschen.de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

I have a 268MB file open for writing.  I close it and then
immediately try to mmap() it, and a get ENOMEM.  However I do have the
VM space available and can malloc() the size of the file right after the 
failure.  Also, I have mmap()'ed other similar files in the same program 
before this, but these had not just been closed.

My initial guess was that it was timing related, but if I wait for 5
seconds and try again I still get the failure.

I wasn't able to duplicate it in a small example since my app has a 
bunch of threads and is doing other stuff at the same time.

Any suggestions for solutions or workarounds?  Maybe strategic use of 
fsync() ?

Thanks,

     Wayne

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