[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Memory leaks in font objects
From: |
Dmitry Antipov |
Subject: |
Memory leaks in font objects |
Date: |
Thu, 24 Oct 2013 10:31:55 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 |
On my system, (length (x-list-fonts "*")) is 3007, and this function:
(defun bloat-font ()
(interactive)
(let ((fonts (x-list-fonts "*")))
(while fonts
(condition-case nil (set-frame-font (car fonts)) (error nil))
(setq fonts (cdr fonts))
(redisplay))))
causes Emacs (default GTK3 build) to grow up to ~360M RSS, mostly
because a lot of font resources aren't freed when font objects are
reclaimed. Proper reclamation reduces RSS to ~150M. This is the
most giant memory leak I've ever seen. I'm trying to fix this by
adding simple finalization support for Lisp_Vectors; comments are
welcome.
Dmitry
font_finalize.patch
Description: Text Data
- Memory leaks in font objects,
Dmitry Antipov <=