From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: Emacs bzr memory footprint Date: Thu, 13 Oct 2011 17:23:08 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1318540997 28012 80.91.229.12 (13 Oct 2011 21:23:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 13 Oct 2011 21:23:17 +0000 (UTC) Cc: Emacs developers To: Carsten Mattner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 13 23:23:13 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 1RESkD-0004by-Af for ged-emacs-devel@m.gmane.org; Thu, 13 Oct 2011 23:23:13 +0200 Original-Received: from localhost ([::1]:58071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RESkC-0000Er-NF for ged-emacs-devel@m.gmane.org; Thu, 13 Oct 2011 17:23:12 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RESkA-0000Em-5s for emacs-devel@gnu.org; Thu, 13 Oct 2011 17:23:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RESk8-0000LT-D2 for emacs-devel@gnu.org; Thu, 13 Oct 2011 17:23:10 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:58776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RESk8-0000LP-5d for emacs-devel@gnu.org; Thu, 13 Oct 2011 17:23:08 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RESk8-0006Vw-3n; Thu, 13 Oct 2011 17:23:08 -0400 In-Reply-To: (Carsten Mattner's message of "Thu, 13 Oct 2011 11:24:25 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 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:145159 Archived-At: Carsten Mattner writes: > I've been wondering whether it's normal for Emacs to start with > 10 or 20 megs and stay at ~100 megs after opening and closing > multiple buffers. > > I do use ido and a couple other common modes/libs for various > features or programming languages. Nothing fancy, really. > I can try to test with no custom config, but won't be able to use > it for real work, just letting it idle. > > Is this in the normal footprint or way out of place when > Emacs sits there idling with not a single buffer open. > > Emacs versions in use are Linux with X but no toolkit and > Cocoa Emacs, both from bzr. > > Does Emacs have some kind of memory reclaim or gc mechanism? Memory can only be return back to the system in chunks (pages usually) and only when the complete chunk becomes free. Because how the allocation works it is possible to have on the same chunk data that is free (like a buffer that has been killed) and data that is not: history, lisp functions and data, so it is never completely free. As a data point we are not doing too bad, this emacs from work: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 19053 dann 16 0 133m 129m 3864 S 0.0 1.6 177:42.07 emacs has been running for 212 days, 3 hours, 45 minutes, 2 seconds it has 202 open buffers, the terminal frame count has reached 678 and the memory usage is still reasonable after that much time of daily usage .