From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: how do you track down emacs memory leaks? Date: Sat, 20 Dec 2008 15:39:33 -0500 Message-ID: <87vdtetwca.fsf@cyd.mit.edu> References: <9aa0cfde0811012105o20c51089j1cd80d81d2895a6d@mail.gmail.com> <87d4hclu5q.fsf@cyd.mit.edu> <9aa0cfde0811030724s2ee667e2l59cc94a97e4fc1f@mail.gmail.com> <87k5bjfmvz.fsf@cyd.mit.edu> <9aa0cfde0812200827u44c9d436tbacbb47d9e07901f@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229805589 21353 80.91.229.12 (20 Dec 2008 20:39:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Dec 2008 20:39:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Ami Fischman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 20 21:40:54 2008 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 1LE8d1-0001qo-VC for ged-emacs-devel@m.gmane.org; Sat, 20 Dec 2008 21:40:52 +0100 Original-Received: from localhost ([127.0.0.1]:40805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LE8bp-0005g4-FN for ged-emacs-devel@m.gmane.org; Sat, 20 Dec 2008 15:39:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LE8bk-0005fP-3Z for emacs-devel@gnu.org; Sat, 20 Dec 2008 15:39:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LE8bi-0005f9-L6 for emacs-devel@gnu.org; Sat, 20 Dec 2008 15:39:31 -0500 Original-Received: from [199.232.76.173] (port=47906 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LE8bi-0005f6-Fb for emacs-devel@gnu.org; Sat, 20 Dec 2008 15:39:30 -0500 Original-Received: from cyd.mit.edu ([18.115.2.24]:45191) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LE8bi-0006Yr-4w for emacs-devel@gnu.org; Sat, 20 Dec 2008 15:39:30 -0500 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 2E66D57E175; Sat, 20 Dec 2008 15:39:33 -0500 (EST) In-Reply-To: <9aa0cfde0812200827u44c9d436tbacbb47d9e07901f@mail.gmail.com> (Ami Fischman's message of "Sat, 20 Dec 2008 08:27:49 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:107138 Archived-At: "Ami Fischman" writes: > Since this thread was about debugging methods, I figured I'd add to it > the way that I finally found the culprit: > > (defun ami-big-var-p (sym) > (when (and (boundp sym) > (> (length (prin1-to-string (symbol-value sym))) (* 1024 1024))) > t)) > (mapatoms '(lambda (sym) > (when (ami-big-var-p sym) > (message (symbol-name sym))))) > > This led me to the insanely large variable and from there it was just > a matter of tracking down its construction. Thanks. Could you write this up into something that can go into etc/DEBUG?