delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/08/12/07:46:50

X-Spam-Check-By: sourceware.org
Message-ID: <BAY107-F22549D794C527187392FB2F8480@phx.gbl>
X-Sender: emacs_user AT hotmail DOT com
In-Reply-To: <u8xludx91.fsf@gnu.org>
From: "emacs user" <emacs_user AT hotmail DOT com>
To: emacs-pretest-bug AT gnu DOT org
Cc: cygwin AT cygwin DOT com
Subject: Re: reproducible cygwin memory problems
Date: Sat, 12 Aug 2006 07:46:33 -0400
Mime-Version: 1.0
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

Eli, here is a response from the cygwin list. thanks to Reini Urban for 
this.


Date: Sat, 12 Aug 2006 11:32:01 +0200
From: Reini Urban <rurban at x-ray dot at>
To:  cygwin at cygwin dot com
Subject: Re: reproducible cygwin memory problems
Sender: cygwin-owner 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/

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


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