From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs bzr memory footprint Date: Thu, 13 Oct 2011 15:43:30 +0200 Message-ID: <834nzd2eil.fsf@gnu.org> References: <83fwix2osa.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1318513428 19393 80.91.229.12 (13 Oct 2011 13:43:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 13 Oct 2011 13:43:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Carsten Mattner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 13 15:43:43 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RELZX-0007pS-Bc for ged-emacs-devel@m.gmane.org; Thu, 13 Oct 2011 15:43:43 +0200 Original-Received: from localhost ([::1]:36967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RELZW-0004cg-V4 for ged-emacs-devel@m.gmane.org; Thu, 13 Oct 2011 09:43:42 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RELZQ-0004cC-CP for emacs-devel@gnu.org; Thu, 13 Oct 2011 09:43:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RELZM-00082O-BW for emacs-devel@gnu.org; Thu, 13 Oct 2011 09:43:36 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:54453) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RELZM-00082I-3c for emacs-devel@gnu.org; Thu, 13 Oct 2011 09:43:32 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LT000F00BA2G100@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Thu, 13 Oct 2011 15:43:30 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.17.178]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LT000FXYBGF9W20@a-mtaout23.012.net.il>; Thu, 13 Oct 2011 15:43:28 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:145123 Archived-At: > Date: Thu, 13 Oct 2011 15:13:55 +0200 > From: Carsten Mattner > Cc: emacs-devel@gnu.org > > "opening and closing" means loading some source file (C, Erlang, > Text, Haskell, M4, something else) and maybe erc-tls. Then after nuking > all buffers and emacs using minimum 100 megs I wondered why no > gc kicked in to reduce it by at least 30 megs (random number). Don't forget that visiting all these files invoked the corresponding major and minor modes, which were then loaded by Emacs, and that consumes memory. Emacs does not unload packages automatically, so that memory continues to be in use even if you kill the buffers. In addition, there are internal buffers and data structures, such as load-history, which grow for as long as your session is up, and are not shrunk when you kill buffers. I don't know if several tens of MBs can be explained by this, but some of them surely can. > Are there known leaks with erlang-mode or haskell-mode? There can be no memory leak on the Lisp side. Any leaks are always bugs in Emacs, not in any Lisp code that it runs.