delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/08/12/05:32:10

X-Spam-Check-By: sourceware.org
Message-ID: <44DDA011.8090806@x-ray.at>
Date: Sat, 12 Aug 2006 11:32:01 +0200
From: Reini Urban <rurban AT x-ray DOT at>
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
Subject: Re: reproducible cygwin memory problems
References: <BAY107-F32EA2D0EBCD7400CCE692FF84B0 AT phx DOT gbl>
In-Reply-To: <BAY107-F32EA2D0EBCD7400CCE692FF84B0@phx.gbl>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

emacs user schrieb:
> Dear cygwin friends, while debugging some emacs related problem, we seem 
> to come to the conclusion that there is a cygwin issue here.  can 
> someone please comment on this?
> 
>> From: Eli Zaretskii <eliz AT gnu DOT org>
>> > From: "emacs user" <emacs_user AT hotmail DOT com>
>> > Cc: emacs-pretest-bug AT gnu DOT org
>> > Bcc:
>> > Date: Thu, 10 Aug 2006 01:06:22 -0400
>> >
>> > #kill it
>> > #(clear-image-cache t)
>> > I am here1
>> > I am here2
>> > I am here4
>> > I am here5
>> > I am here6
>> > I am here5
>> > I am here6
>>
>> Okay, thanks.  This shows that free_image does get called.
>>
>> What image types did you try till now?  If you tried with only one
>> image type, please see if other image types exhibit the same problem
>> (i.e. that memory is not returned to system when an image is killed
>> and the image cache cleared).
> 
> problem occurs with both jpeg and gif.  I didnt try others
> 
>> If you already tried all the supported image types, I cannot think of
>> any reason but one: that the Cygwin implementation of malloc/free does
>> not return freed memory to the OS.  If this is the conclusion, then it
>> should probably be taken up with Cygwin maintainers on their mailing
>> list.

Look Eli,
that's really a bold statement, esp. when elisp is involved.
cygwin uses the newlib libc. How does it come to your mind that newlib's 
free() and subsequently Microsoft's VirtualFree (,MEM_RELEASE) doesn't 
work as advertised?
Please see the src for newlib's free() at src/newlib/libc/stdlib/mallocr.c
http://cygwin.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdlib/mallocr.c?rev=1.15&content-type=text/x-cvsweb-markup&cvsroot=src


POSIX free() is not like perl or lisp, where there's no such concept of 
free(), if by lazyness or better strategies.

POSIX free() and cygwin's free() does give back it's malloc'ed buffers 
back to the OS, and the OS does list them correctly as free.

What you have here is an ELISP issue, which doesn't free it's interim's 
memory, and you falsely accuse the C part of the image library. Please 
have a look again in some lisp allocated buffers and then check if some 
free() is missing.


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