From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Memory leak in keyboard variables? Date: Thu, 11 Dec 2008 10:59:56 -0500 Message-ID: References: <87d4fzh0qc.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229011286 26067 80.91.229.12 (11 Dec 2008 16:01:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2008 16:01:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 11 17:02:29 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 1LAnyZ-0006zM-11 for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2008 17:01:19 +0100 Original-Received: from localhost ([127.0.0.1]:41889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAnxN-0002Wu-Py for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2008 11:00:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAnxI-0002Vq-A5 for emacs-devel@gnu.org; Thu, 11 Dec 2008 11:00:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAnxG-0002VX-Sg for emacs-devel@gnu.org; Thu, 11 Dec 2008 10:59:59 -0500 Original-Received: from [199.232.76.173] (port=48447 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAnxG-0002VU-NN for emacs-devel@gnu.org; Thu, 11 Dec 2008 10:59:58 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:14187) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LAnxG-0006GS-Cf for emacs-devel@gnu.org; Thu, 11 Dec 2008 10:59:58 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkcFAM/HQElFxIVh/2dsb2JhbACBbMs3gnmBLA X-IronPort-AV: E=Sophos;i="4.33,753,1220241600"; d="scan'208";a="30924730" Original-Received: from 69-196-133-97.dsl.teksavvy.com (HELO pastel.home) ([69.196.133.97]) by ironport2-out.teksavvy.com with ESMTP; 11 Dec 2008 10:59:56 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 2B29A86F6; Thu, 11 Dec 2008 10:59:56 -0500 (EST) In-Reply-To: <87d4fzh0qc.fsf@cyd.mit.edu> (Chong Yidong's message of "Wed, 10 Dec 2008 22:03:39 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:106803 Archived-At: > 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. No, indeed, they're not GC'd: they're static. > 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. The Lisp_Misc_Kboard_Objfwd only stores the location of the Lisp_Object slot in the keyboard objects. So the objects will becomes unreachable when the keyboard object is freed. Maybe the keyboard object is not freed when the terminal is freed? Stefan