X-Spam-Check-By: sourceware.org Message-ID: X-Sender: emacs_user AT hotmail DOT com In-Reply-To: From: "emacs user" To: eliz AT gnu DOT org Cc: emacs-pretest-bug AT gnu DOT org, cygwin AT cygwin DOT com Subject: Re: reproducible cygwin memory problems Date: Sat, 12 Aug 2006 12:48:24 -0400 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 >From: Eli Zaretskii > >[I'm not subscribed to the Cygwin list, so please CC me directly.] > > > From: "emacs user" > > Bcc: > > Date: Sat, 12 Aug 2006 07:46:33 -0400 > > Cc: cygwin AT cygwin DOT com > > > > Eli, here is a response from the cygwin list. thanks to Reini Urban for > > this. > > > > 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. > >It's possible that I'm wrong, of course. Let me state the facts and >observations that led me to my conclusion: > > . The OP reported that the problem happens only with image files. > When he edits text files, the Emacs memory footprint stays at a > reasonable value. > > . After killing the image buffer, the OP invoked the Lisp function > clear-image-cache, which is supposed to release any memory used by > Emacs for storing images. There's no other Lisp memory that I can > see in the sources that is used for images, and that could be left > unreleased. To be sure, I'd like to ask emacs_user AT hotmail DOT com, > who is the OP, to invoke "M-x garbage-collect RET" after > clear-image-cache, and see if that changes anything. tried that, no effect on memory usage. I used a fresh copy of latest (as of right now) gnu emacs from cvs, latest cygwin, after make distclean, configure, make. > . The OP traced the Emacs code in clear-image-cache, and saw that > the function in the image libraries that frees the image is indeed > called. > > . Other Emacs builds, including the native Windows build and a > GNU/Linux build, do not exhibit this behavior. > >Given these observations, and the fact that the Cygwin build of Emacs >runs almost the same C and Lisp code as the GNU/Linux build, what >other factors can be involved here? _________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- 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/