Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 12 Mar 2002 21:34:15 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: mmap of large amount returns invalid pointer Message-ID: <20020313023415.GB20897@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <15502 DOT 47003 DOT 444262 DOT 965070 AT asv-058 DOT sjc DOT ca DOT bbnow DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15502.47003.444262.965070@asv-058.sjc.ca.bbnow.net> User-Agent: Mutt/1.3.23.1i On Tue, Mar 12, 2002 at 06:21:15PM -0800, Stephen Weeks wrote: > >> looks like you have overlooked that mmap doesn't return NULL >> despite win32 error in strace (see below): >> >> c:\>net helpmsg 1455 >> >> The paging file is too small for this operation to complete. > >Thanks for pointing that out. I agree that it looks like the Cygwin >dll is failing to check for the Win32 error, which should have caused >mmap to return -1. > >But even if that is fixed, I don't understand why Cygwin/mmap is >unable to obtain the memory. My earlier message showed that at the >start of the program the information returned by GlobalMemoryStatus >shows that there is easily >300Mb available. > >TotalPhys: 209113088 >AvailPhys: 166580224 >TotalPageFile: 309587968 >AvailPageFile: 275365888 >TotalVirtual: 2147352576 >AvailVirtual: 1589841920 > >I tried a modified version of the program that uses VirtualAlloc/Free >instead of mmap/munmap and it is able to allocate, zero, and free >300Mb. Sounds like you should be looking at the cygwin source code. That's the best way to achieve clarity in cases like this. cgf -- Please do not send me personal email with cygwin questions. Use the resources at http://cygwin.com/ . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/