unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: "Ami Fischman" <ami@fischman.org>
Cc: emacs-devel@gnu.org
Subject: Re: how do you track down emacs memory leaks?
Date: Sat, 20 Dec 2008 15:39:33 -0500	[thread overview]
Message-ID: <87vdtetwca.fsf@cyd.mit.edu> (raw)
In-Reply-To: <9aa0cfde0812200827u44c9d436tbacbb47d9e07901f@mail.gmail.com> (Ami Fischman's message of "Sat, 20 Dec 2008 08:27:49 -0800")

"Ami Fischman" <ami@fischman.org> 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?




      parent reply	other threads:[~2008-12-20 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-02  4:05 how do you track down emacs memory leaks? Ami Fischman
2008-11-03 15:13 ` Chong Yidong
2008-11-03 15:24   ` Ami Fischman
2008-11-04 16:59     ` Chong Yidong
2008-12-20 16:27       ` Ami Fischman
2008-12-20 17:38         ` Leo
2008-12-20 20:39         ` Chong Yidong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vdtetwca.fsf@cyd.mit.edu \
    --to=cyd@stupidchicken.com \
    --cc=ami@fischman.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).