unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* how do you track down emacs memory leaks?
@ 2008-11-02  4:05 Ami Fischman
  2008-11-03 15:13 ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Ami Fischman @ 2008-11-02  4:05 UTC (permalink / raw)
  To: emacs-devel

[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-12-20 20:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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).