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: Memory again Date: Sat, 26 Nov 2011 22:31:10 +0200 Message-ID: <83mxbi7hip.fsf@gnu.org> References: <4ED0F945.5090805@yandex.ru> <83pqge7syw.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1322339546 26157 80.91.229.12 (26 Nov 2011 20:32:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 26 Nov 2011 20:32:26 +0000 (UTC) Cc: antipov@mvista.com, emacs-devel@gnu.org To: Carsten Mattner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 26 21:32:22 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 1RUOv8-0004bJ-3F for ged-emacs-devel@m.gmane.org; Sat, 26 Nov 2011 21:32:22 +0100 Original-Received: from localhost ([::1]:45782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUOv7-0000HB-0g for ged-emacs-devel@m.gmane.org; Sat, 26 Nov 2011 15:32:21 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:49708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUOv4-0000Gu-Hr for emacs-devel@gnu.org; Sat, 26 Nov 2011 15:32:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RUOv3-0002yw-FG for emacs-devel@gnu.org; Sat, 26 Nov 2011 15:32:18 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:40821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUOv2-0002yV-Sw for emacs-devel@gnu.org; Sat, 26 Nov 2011 15:32:17 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LVA00400BM4KZ00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Sat, 26 Nov 2011 22:31:08 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.100.85]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LVA003LHBNTVBD0@a-mtaout20.012.net.il>; Sat, 26 Nov 2011 22:31:06 +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.166 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:146270 Archived-At: > Date: Sat, 26 Nov 2011 20:02:27 +0100 > From: Carsten Mattner > Cc: antipov@mvista.com, emacs-devel@gnu.org >=20 > On Sat, Nov 26, 2011 at 5:23 PM, Eli Zaretskii wrote= : > >> Date: Sat, 26 Nov 2011 15:58:49 +0100 > >> From: Carsten Mattner > >> Cc: emacs-devel@gnu.org > >> > >> Does emacs fear the memory may be used by someone else > >> and hold onto what it claimed? > > > > It doesn't, or at least shouldn't. =A0When enough memory has been > > reclaimed by GC, it should give it away to the system. =A0At leas= t on > > some systems, I actually see that in action, after killing a larg= e > > buffer. >=20 > As it's at 56.1megs at the moment after having left it open > for a couple more hours, I guess that Dmitry's heap fragmentation > explanation sounds most likely. If you start a fresh Emacs and visit a very large file, do you see th= e footprint increase by approximately that file's size? And if you the= n kill the buffer visiting the file, do you see the footprint go down back to almost what it was after startup? > I'd like to not guess but help find potential issues which > can be corrected. >=20 > How can I instrument/help find leaks or errors in the memory > manager? I'd start by showing the value returned by `garbage-collect' and comparing it with the value after startup.