X-Spam-Check-By: sourceware.org Message-ID: <44DEEF84.803@x-ray.at> Date: Sun, 13 Aug 2006 11:23:16 +0200 From: Reini Urban User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8.0.6) Gecko/20060729 SeaMonkey/1.0.4 MIME-Version: 1.0 To: cygwin AT cygwin DOT com, Eli Zaretskii , emacs-pretest-bug AT gnu DOT org, emacs_user AT hotmail DOT com, cygwin AT cygwin DOT com Subject: Re: reproducible cygwin memory problems References: <20060812165300 DOT GB19272 AT calimero DOT vinschen DOT de> In-Reply-To: <20060812165300.GB19272@calimero.vinschen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 has nothing directly to do with the possible xemacs munmap() problem, but maybe there's a logic flaw somewhere. -- Reini Urban http://phpwiki.org/ http://murbreak.at/ http://helsinki.at/ http://spacemovie.mur.at/ -- 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/