From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Memory leak in keyboard variables? Date: Tue, 16 Dec 2008 13:31:45 +0900 Message-ID: References: <87oczeuo0a.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1229401933 5550 80.91.229.12 (16 Dec 2008 04:32:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Dec 2008 04:32:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 16 05:33:20 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LCRcT-0004dP-RF for ged-emacs-devel@m.gmane.org; Tue, 16 Dec 2008 05:33:18 +0100 Original-Received: from localhost ([127.0.0.1]:50039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCRbF-0002Mt-Gv for ged-emacs-devel@m.gmane.org; Mon, 15 Dec 2008 23:32:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCRbA-0002Ke-GC for emacs-devel@gnu.org; Mon, 15 Dec 2008 23:31:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCRb7-0002HR-0w for emacs-devel@gnu.org; Mon, 15 Dec 2008 23:31:56 -0500 Original-Received: from [199.232.76.173] (port=37684 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCRb6-0002HO-RS for emacs-devel@gnu.org; Mon, 15 Dec 2008 23:31:52 -0500 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:34102) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LCRb6-0002a5-55 for emacs-devel@gnu.org; Mon, 15 Dec 2008 23:31:52 -0500 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id mBG4VkVj004698; Tue, 16 Dec 2008 13:31:46 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id mBG4Vkl6020151; Tue, 16 Dec 2008 13:31:46 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp2.aist.go.jp with ESMTP id mBG4Vj54029606; Tue, 16 Dec 2008 13:31:45 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1LCRaz-0005OI-S2; Tue, 16 Dec 2008 13:31:45 +0900 In-reply-to: <87oczeuo0a.fsf@cyd.mit.edu> (message from Chong Yidong on Sun, 14 Dec 2008 22:16:05 -0500) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-operating-system: by monty-python.gnu.org: Solaris 9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106951 Archived-At: In article <87oczeuo0a.fsf@cyd.mit.edu>, Chong Yidong writes: > I think the problem is that font_clear_cache is incorrectly written. > For some reason, it assumes that the font cache entries have the form > (font-spec [entity1 entity2...]) > when in fact, they have the form > (font-spec entity1 entity2...) > The following patch to font_clear_cache frees 60-70k of memory per > terminal. Ah, it seems that your patch is correct. > Do you know why font_clear_cache was written this way, In the early version of font-backend codes, font_driver->list returns a vector. I changed it to return a list at sometime, but have forgotten to adjust font_clear_cache. > and whether there > could be any other places in the font code that make this incorrect > assumption? I've just read through font.c, but the other places look ok. --- Kenichi Handa handa@m17n.org