From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ami Fischman" Newsgroups: gmane.emacs.devel Subject: Re: how do you track down emacs memory leaks? Date: Mon, 3 Nov 2008 07:24:19 -0800 Message-ID: <9aa0cfde0811030724s2ee667e2l59cc94a97e4fc1f@mail.gmail.com> References: <9aa0cfde0811012105o20c51089j1cd80d81d2895a6d@mail.gmail.com> <87d4hclu5q.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225725881 25907 80.91.229.12 (3 Nov 2008 15:24:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Nov 2008 15:24:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Chong Yidong" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 03 16:25:42 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kx1JA-0005Qe-BK for ged-emacs-devel@m.gmane.org; Mon, 03 Nov 2008 16:25:36 +0100 Original-Received: from localhost ([127.0.0.1]:40486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kx1I3-0007x8-IC for ged-emacs-devel@m.gmane.org; Mon, 03 Nov 2008 10:24:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kx1Hy-0007w7-Sy for emacs-devel@gnu.org; Mon, 03 Nov 2008 10:24:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kx1Hy-0007vv-B0 for emacs-devel@gnu.org; Mon, 03 Nov 2008 10:24:22 -0500 Original-Received: from [199.232.76.173] (port=47218 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kx1Hy-0007vr-5m for emacs-devel@gnu.org; Mon, 03 Nov 2008 10:24:22 -0500 Original-Received: from an-out-0708.google.com ([209.85.132.242]:52304) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kx1Hx-0004aA-N5 for emacs-devel@gnu.org; Mon, 03 Nov 2008 10:24:21 -0500 Original-Received: by an-out-0708.google.com with SMTP id c38so39477ana.21 for ; Mon, 03 Nov 2008 07:24:19 -0800 (PST) Original-Received: by 10.142.142.16 with SMTP id p16mr116909wfd.143.1225725859278; Mon, 03 Nov 2008 07:24:19 -0800 (PST) Original-Received: by 10.143.11.8 with HTTP; Mon, 3 Nov 2008 07:24:19 -0800 (PST) In-Reply-To: <87d4hclu5q.fsf@cyd.mit.edu> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105303 Archived-At: > Does this problem only show up when you use gnus? Yes. > Could you try keeping > another Emacs session around for other non-gnus usage, and see if it > leaks memory? I have and it doesn't. At least not nearly at the rate that the gnus-using session does. I updated my version of gnus from ngnus-0.10 to CVS head yesterday and the leak seems to have slowed down significantly - only about 8MB overnight. So I suspect some trigger has been coincidentally suppressed, but it seems that no elisp code should be able to cause emacs to grow in memory usage disproportional to the numbers reported by memory-usage, so there is still probably a lurking leak in emacs. Do you have any tools/techniques you use to track down C-level leaks? Do you have any tools/techniques to attribute the numbers in memory-usage? I.e. if you see "bytes in cons cells" go up dramatically, any way to take snapshots of this data and then analyze the difference visually or programmatically? -a