[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory leak in keyboard variables?

From: Chong Yidong
Subject: Re: Memory leak in keyboard variables?
Date: Fri, 19 Dec 2008 20:50:56 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Stephen J. Turnbull" <address@hidden> writes:

> Chong Yidong writes:
>  > Markus Triska <address@hidden> writes:
>  > 
>  > > Please also try emacsclient with "-c" instead of "-t" - there seems to
>  > > be a probably different and still quite big leak there as will.
>  > 
>  > With the recent fix to font_clear_cache, the leak is reduced to 30-40k
>  > per frame.  This leak seems to be tied to GTK and X toolkits somehow.
>  > It does not appear when Emacs is compiled with --with-x-toolkit=no.
> The toolkits undoubtedly do their own font caching, and probably won't
> release the space until Emacs exits.

Yes, this is a possibility.

Another data point: the leak occurs when the menu-bar is enabled, but
not when the menu-bar is disabled.  It's not necessary to see the leak
using Emacsclient, as ordinary frame creating/deletion shows it:

(dotimes (i 15)
  (let* ((params '((window-system . x)
                   (menu-bar-lines . 1)
                   (tool-bar-lines . 1)))
    (setq frame (x-create-frame params))
    (delete-frame frame)

I have not been able to track down the source of this leak within Emacs.
As far as I can tell, the existing menu-bar items allocation functions
(in xmenu.c, menu.c, keyboard.c, and gtkutil.c) free all the memory they
allocate, yet about 10k of memory remains unfreed with each frame

reply via email to

[Prev in Thread] Current Thread [Next in Thread]