From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Debugging memory leaks/stale references
Date: Mon, 27 Sep 2004 16:49:23 -0400 [thread overview]
Message-ID: <jwvpt47phuw.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87mzzb30vs.fsf@deneb.enyo.de> (Florian Weimer's message of "Mon, 27 Sep 2004 22:36:23 +0200")
>> I think it would be worthwhile to start with the basic info returned by
>> `garbage-collect' and such stuff. See `memory-usage.el' below.
>> [ I thought you already tried that, but the few lines above make me think
>> that you don't even know whether the extra MBs are made up of cons cells, or
>> strings, or non-elisp-data, or ...]
> Others already did this. But thanks anyway, I repeated the
> experiment: The numbers indeed lack any distinct increase in
> magnitude. 8-(
Well, that means that the increase is apparently elsewhere, which is good
because it already tells you that hacking on the gc_marking code probably
won't help you.
Now, that doesn't rule out all of alloc.c :-(
>>> Are there any other objects that can change their size after
>>> allocation? (I'm pretty sure that there are no additional Lisp
>>> objects allocated, but maybe an existing object grows without bounds.)
>>
>> Yes. Things like the specpdl "stack", the matrices used in display, maybe
>> the text-property-tree nodes, ...
> Hmm, I'm going to gather a few more stats.
> (And running Emacs under valgrind could prove helpful because I could
> determine if the low-level allocator leaks memory.)
Another thing you might want to try is:
- check /proc/$$/maps before and after the memory growth.
- based on that, infer the memory range where the new (tho supposedly dead)
data is located.
- from GDB, peek at that memory range to see if you recognize the kind of
data that's there.
Stefan
next prev parent reply other threads:[~2004-09-27 20:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-21 17:38 Debugging memory leaks/stale references Florian Weimer
2004-09-21 19:49 ` Simon Josefsson
2004-09-27 19:40 ` Florian Weimer
2004-09-27 19:52 ` Stefan Monnier
2004-09-27 20:36 ` Florian Weimer
2004-09-27 20:49 ` Stefan Monnier [this message]
2004-09-27 20:48 ` Simon Josefsson
2004-09-28 15:20 ` Richard Stallman
2004-09-28 21:00 ` Florian Weimer
2004-09-28 21:51 ` Florian Weimer
2004-09-29 16:39 ` Richard Stallman
2004-09-29 23:51 ` Kenichi Handa
2004-09-28 21:40 ` Kim F. Storm
2004-09-21 19:57 ` Stefan Monnier
2004-09-21 21:01 ` Florian Weimer
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvpt47phuw.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.