[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Memory leak in keyboard variables?
From: |
Chong Yidong |
Subject: |
Memory leak in keyboard variables? |
Date: |
Wed, 10 Dec 2008 22:03:39 -0500 |
I've been looking into the memory leak that occurs when terminal frames
are killed. From Markus Triska's recipe:
emacs -nw -f server-start
for i in {1..100}; do emacsclient -t -e "(save-buffers-kill-terminal)"; done
I think at least some of this leakage is due to unfreed Lisp objects.
For instance, this code in xterm.el leads to ~ 1000 unfreed conses per
terminal created and destroyed:
(let ((map (copy-keymap xterm-function-map)))
...
(set-keymap-parent map (keymap-parent input-decode-map))
(set-keymap-parent input-decode-map map)))
Now, input-decode-map is defined in keyboard.c, using DEFVAR_KBOARD. It
is a Lisp_Misc_Kboard_Objfwd object, and if I'm not mistaken, such
objects are not garbage-collected.
When the terminal is killed, are its keyboard's Lisp_Misc_Kboard_Objfwd
objects freed? As far as I can tell, they are not freed. But I am no
expert in this part of the code, so maybe someone else can clue me in.
- Memory leak in keyboard variables?,
Chong Yidong <=
- Re: Memory leak in keyboard variables?, Andreas Schwab, 2008/12/11
- Re: Memory leak in keyboard variables?, Chong Yidong, 2008/12/11
- Re: Memory leak in keyboard variables?, Chong Yidong, 2008/12/11
- Re: Memory leak in keyboard variables?, Markus Triska, 2008/12/13
- Re: Memory leak in keyboard variables?, Chong Yidong, 2008/12/13
- Re: Memory leak in keyboard variables?, Chong Yidong, 2008/12/16
- Re: Memory leak in keyboard variables?, Stephen J. Turnbull, 2008/12/16
- Re: Memory leak in keyboard variables?, Chong Yidong, 2008/12/19
- Re: Memory leak in keyboard variables?, Jan Djärv, 2008/12/20
- Re: Memory leak in keyboard variables?, Markus Triska, 2008/12/20