From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Memory leak Date: Mon, 19 May 2008 20:59:26 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <85lk2b1829.fsf@lola.goethe.zz> <482CD48E.3020601@gmail.com> <482D8332.5030908@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1211198412 15526 80.91.229.12 (19 May 2008 12:00:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 May 2008 12:00:12 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org, lennart.borgman@gmail.com, monnier@IRO.UMontreal.CA, jasonr@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 19 14:00:46 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 1Jy42Y-0007EB-Nh for ged-emacs-devel@m.gmane.org; Mon, 19 May 2008 14:00:30 +0200 Original-Received: from localhost ([127.0.0.1]:50012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jy41o-0000M5-TM for ged-emacs-devel@m.gmane.org; Mon, 19 May 2008 07:59:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jy41j-0000Lj-Iw for emacs-devel@gnu.org; Mon, 19 May 2008 07:59:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jy41f-0000HO-3y for emacs-devel@gnu.org; Mon, 19 May 2008 07:59:39 -0400 Original-Received: from [199.232.76.173] (port=41698 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jy41e-0000HL-Ud for emacs-devel@gnu.org; Mon, 19 May 2008 07:59:34 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:60270) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jy41Y-0004Z7-A7; Mon, 19 May 2008 07:59:28 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 6DA5D2C40; Mon, 19 May 2008 20:59:26 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/23.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-kernel: by monty-python.gnu.org: NetBSD 3.0 (DF) 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:97390 Archived-At: >>>>> On Mon, 19 May 2008 20:13:15 +0900, Kenichi Handa said: >> It seems like the `free_entity' entry in `struct font_driver' no >> longer makes sense because you tried to remove the memory leaks by >> avoiding Lisp_Save_Value in font entities instead of calling >> free_entity at some proper timings. Is that right? > Not exactly. When I deleted ftfont_free_entity, it was in my mind > to change also ftfont_list to avoid using Lisp_Save_Value, but I > just forgot to implement that change. > The free_entity callback is still called in font_clear_cache if a > font-driver provides that function. So, `free_entity' is supposed to be still valid. Then I think the entities deleted in `font_delete_unmatched' need to be freed as they are not kept in the cache. Also, there are some suspected leaks in font-related code: * `names' in xfont_list_pattern. * `charset' in ftfont_spec_pattern when it is created from Vscript_representative_chars. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp