delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/12/21:22:33

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
MIME-Version: 1.0
Message-ID: <15502.47003.444262.965070@asv-058.sjc.ca.bbnow.net>
Date: Tue, 12 Mar 2002 18:21:15 -0800
From: Stephen Weeks <sweeks AT acm DOT org>
To: cygwin AT cygwin DOT com
cc: Heribert Dahms <heribert_dahms AT icon-scm DOT com>
Subject: RE: mmap of large amount returns invalid pointer
In-Reply-To: <BF35D9C143BCCC4EB63181B67C9320C83A9B75@serv-075.icon-germany.local>
References: <BF35D9C143BCCC4EB63181B67C9320C83A9B75 AT serv-075 DOT icon-germany DOT local>
X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid

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

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

- Raw text -


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