X-Spam-Check-By: sourceware.org Date: Thu, 18 Jan 2007 18:18:52 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: 1.7.0 CVS mmap failure Message-ID: <20070118171852.GA18119@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20070105182234 DOT GC12776 AT calimero DOT vinschen DOT de> <20070105192302 DOT GD12776 AT calimero DOT vinschen DOT de> <20070110095345 DOT GL23638 AT calimero DOT vinschen DOT de> <20070117103959 DOT GA23172 AT calimero DOT vinschen DOT de> <20070118091400 DOT GC27843 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070118091400.GC27843@calimero.vinschen.de> User-Agent: Mutt/1.4.2.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 18 10:14, Corinna Vinschen wrote: > On Jan 17 13:42, Brian Ford wrote: > > mmap.cc:1203 mmap64(): > > map_list = mmapped_areas.get_list_by_fd (fd); > > mmap.cc:982 mmap_worker(): > > if (!(map_list = mmapped_areas.get_list_by_fd (fd)) > > mmap.cc:983 mmap_worker(): > > && !(map_list = mmapped_areas.add_list (fd))) > > > > Also: > > > > mmap.cc:1134 mmap64(): > > DWORD low = GetFileSize (fh->get_handle (), &high); > > > > [...] > > PS. Since this isn't a bug, I don't expect you to do any more than > > consider putting it in your long term low priority que or reply with a PTC > > Thanks for the evaluation tuits ;-). > > Right, it's an optimization problem rather than a bug. Patches > welcome, but I've put it on my TODO list, too. I have applied a patch to CVS which calls fstat early, at the spot where GetFileSize got called so far. The stat structure is then propagated to subsequent function calls and used there. This should reduce the fstat calls to exactly one per file based mmap call. All my testcases still work fine, but we already saw that my testcases don't cover all weird cases in the world. So, please give this change a serious test. 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/