From: "Ami Fischman" <ami@fischman.org>
To: emacs-devel@gnu.org
Subject: how do you track down emacs memory leaks?
Date: Sat, 1 Nov 2008 21:05:13 -0700 [thread overview]
Message-ID: <9aa0cfde0811012105o20c51089j1cd80d81d2895a6d@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1600 bytes --]
Hi emacs-devel,
I'm looking for advice on how to track down a memory leak in emacs. CVS
HEAD builds I did on 20080702, 20080810, 20080915, and 20081025 all steadily
grow in process VmRSS and VmSize to the tune of ~70-100MB per day when I use
gnus and let it automatically check for new mail. This quickly makes emacs
sluggish for all operations, presumably because of heap-walking slowing way
down (for GC? for consing? I don't know). Stefan Monnier's memory-usage.el
shows growth across the board over time, but none of the numbers come close
to the RSS. For example right now my emacs is at 75MB of RSS (and 175M
total size) but memory-usage says:
Garbage collection stats:
((749993 . 70859) (52116 . 152) (7501 . 2362) 3678192 1020951 (676 . 756)
(19003 . 1331) (136481 . 18922))
=> 6566816 bytes in cons cells
1254432 bytes in symbols
197260 bytes in markers
3678192 bytes of string chars
4083804 bytes of vector slots
17184 bytes in floats
569352 bytes in intervals
Total bytes in lisp objects (not counting string and vector headers):
13304187
Buffer ralloc memory usage:
67 buffers
949032 bytes total (240671 in gaps)
(for a total of ~22.8MB).
I've tried using valgrind and tcmalloc but neither works with a dumped emacs
binary, and I couldn't get enough work done with a temacs binary to extract
useful information.
So, anyone else see memory leaks in the last 6 months? Anyone have any
clever tips on how to snapshot the lisp-space heap and different points in
time and then extracting the delta, preferably summarized by allocation
stacktrace?
-a
[-- Attachment #2: Type: text/html, Size: 1875 bytes --]
next reply other threads:[~2008-11-02 4:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-02 4:05 Ami Fischman [this message]
2008-11-03 15:13 ` how do you track down emacs memory leaks? 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
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=9aa0cfde0811012105o20c51089j1cd80d81d2895a6d@mail.gmail.com \
--to=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).