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 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: In-Reply-To: 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 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 >> > From: "emacs user" >> > 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/