delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/08/14/02:59:12

X-Spam-Check-By: sourceware.org
Date: Mon, 14 Aug 2006 08:59:00 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: reproducible cygwin memory problems
Message-ID: <20060814065900.GB29807@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <BAY107-F22549D794C527187392FB2F8480 AT phx DOT gbl> <uoduqc8g9 DOT fsf AT gnu DOT org> <20060812165300 DOT GB19272 AT calimero DOT vinschen DOT de> <44DEEF84 DOT 803 AT x-ray DOT at>
Mime-Version: 1.0
In-Reply-To: <44DEEF84.803@x-ray.at>
User-Agent: Mutt/1.4.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

On Aug 13 11:23, Reini Urban wrote:
> Corinna Vinschen schrieb:
> ...
> >Ok, back to mmap/munmap.  Private anonymous mappings are implemented in
> >Cygwin by calling VirtualAlloc/VirtualFree.  However, due to
> >restrictions in the Win32 API, VirtualFree is only called by munmap, as
> >soon as *all* pages within a single mmap'ed area are free'ed by this or
> >preceding calls to munmap.
> >
> >In other words, the mmap'ed memory will not be returned to the OS, if
> >not the complete mmap'ed area is munmap'ed.  Therefore I assume that the
> >implementation in Lisp keeps bits of memory around which are not
> >munmap'ed for some internal reason.
> >
> >Of course it's also possible that there's a bug in Cygwin related to the
> >way mmap/munmap is called.  But I have so far no evidence for that and
> >simple mmap/munmap tests show that VirtualFree is called as soon as all
> >pages in a mmap'ed area have been munmap'ed.  If somebody thinks there's
> >a bug in this implementation, please send a simple, self-contained
> >testcase in pure C source code, which allows to reproduce the problem.
> >Of course, patches are welcome, too :)
> 
> And there's the known mmap() under cygwin limitation, esp. harmful to 
> clisp, that mmap() can only be properly aligned to a base address modulo 
> 64k (windows "allocation  granularity"), and not the usual pagesize, if 
> it's 4k or 8k. windows pagesize is still 4k though.
> 
> http://www.cygwin.com/ml/cygwin/2000-09/msg00380.html
> http://www.cygwin.com/ml/cygwin/2004-09/msg00741.html

This is a non-issue since 1.5.19:

http://cygwin.com/ml/cygwin-announce/2006-01/msg00016.html


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/

- Raw text -


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