Subject: bug#15156: 24.3; !MEM FULL!

From: Eli Zaretskii <[email-masked]>
Date: Fri, 06 Sep 2013 12:58:23 +0300

> From: "Sebastien Vauban" <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 06 Sep 2013 11:42:40 +0200
> 
> > Anyway, putting a break at xmalloc conditioned by some large
> > allocation size might show who is requesting this much memory.  I
> > don't see how this can be investigated otherwise without some
> > debugging.
> 
> If you have a recipe which does not constrain too much my daily usage of
> Emacs, I'm willing to apply it.

Something like

  (gdb) break xmalloc if size > 10000
  (gdb) commands
         > bt
	 > continue
	 > end
  (gdb)

And similarly for xzalloc and xrealloc.

Then run Emacs as usual, and the code which allocates these large
chunks of memory will be shown in the backtraces.

> [1] I'd be interested by knowing what something similar you use...

Nothing.  I don't need that.