From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: emacs user Newsgroups: gmane.emacs.devel Subject: Re: Memory again Date: Thu, 5 Jan 2012 08:13:33 +0200 Message-ID: References: <71677AF5-0EE7-426E-B8FA-C2782B3CC36C@swipnet.se> 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 1325744028 13859 80.91.229.12 (5 Jan 2012 06:13:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2012 06:13:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?ISO-8859-1?Q?Jan_Dj=E4rv?= , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 05 07:13:44 2012 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 1Riga7-0002zN-Aa for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2012 07:13:43 +0100 Original-Received: from localhost ([::1]:35090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Riga6-0002LK-9O for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2012 01:13:42 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Riga2-0002LC-GR for emacs-devel@gnu.org; Thu, 05 Jan 2012 01:13:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Riga0-0002Vt-MV for emacs-devel@gnu.org; Thu, 05 Jan 2012 01:13:38 -0500 Original-Received: from mail-we0-f169.google.com ([74.125.82.169]:62027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Riga0-0002NA-Dr for emacs-devel@gnu.org; Thu, 05 Jan 2012 01:13:36 -0500 Original-Received: by werf1 with SMTP id f1so155841wer.0 for ; Wed, 04 Jan 2012 22:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=zT24JPubx9jeUw1IrcKk/als8ZZDnDyefTaR1kyf98E=; b=rR6BQJyWNWKfBESzfBBbQuIBxKcEyTwfFXCg/2/ZyOw/XXiJoe4/lithov49izc3Eo BhcmpteaTQkEIbqGtgH1WT6RgiosgA+Y8Yj3iuNwOc+VjEdZs4sE43NwwI3w4ThH7Hxx 0zZCca4J/4tvZXYd07wFnpWQUwTOlOHeYat6A= Original-Received: by 10.216.131.76 with SMTP id l54mr324436wei.34.1325744013651; Wed, 04 Jan 2012 22:13:33 -0800 (PST) Original-Received: by 10.216.170.138 with HTTP; Wed, 4 Jan 2012 22:13:33 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.169 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:147318 Archived-At: On Fri, Dec 23, 2011 at 12:44 PM, emacs user wrote: > On Fri, Dec 23, 2011 at 2:39 AM, Stefan Monnier > >> The GC stats you posted indicate that the GC knows of about 27MB of data >> (10MB of which is actually unused but can't be returned to malloc due to >> fragmentation) which doesn't account for the 214MB you mention. =A0So it >> looks like that data is held by the C code. >> >> Of course, I don't know what the 214MB represent, if it is resident set >> size, then there really seems to be a leak, whereas if it's the total >> virtual size, it may also be an artifact of various other things. >> >> >> =A0 =A0 =A0 =A0Stefan > > here is something which I am hoping is reproducible by others: > download > http://emacsforosx.com/emacs-builds/Emacs-2011-12-23-universal-10.6.8.dmg > save to desktop. > > start emacs: > $ ~/Desktop/Emacs.app/Contents/MacOS/Emacs -Q& > > create a file that contains the following line many times > asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asd= f > $ wc t : =A0687456 10311840 52246656 t > $ ls -l t: -rw------- =A01 x =A0staff =A052246656 Dec 23 05:08 t > > edit it using the above emacs. > kill all buffers, do M-x garbage-collect > > look at the process: > > =A0$ ps -vefl | head -1 > =A0PID STAT =A0 =A0 =A0TIME =A0SL =A0RE PAGEIN =A0 =A0 =A0VSZ =A0 =A0RSS = =A0 LIM =A0 =A0 TSIZ > %CPU %MEM COMMAND =A0 =A0 =A0 =A0 =A0 =A0UID =A0PPID =A0 C STIME =A0 TTY = =A0 =A0 =A0 =A0 =A0 =A0 F > PRI NI WCHAN =A0 =A0 =A0 =A0 =A0 =A0 =A0ADDR > > before editing the file: > $ ps -vefl | grep 62764 > 62764 S =A0 =A0 =A00:00.78 =A0 0 =A0 0 =A0 =A0 =A00 =A02571020 =A030852 = =A0 =A0 - =A0 =A0 =A0 =A00 > 0.3 =A00.7 /Users/xxx/Deskt =A0 501 62068 0 5:38AM ttys001 =A0 =A0 =A0400= 6 > 49 =A00 - =A0 =A0 =A0ffffff8012762000 > > after editing it, killing the buffer, and doing M-x garbage-collect > =A0$ ps -vefl | grep 62764 > 62764 S =A0 =A0 =A00:01.85 =A0 0 =A0 0 =A0 =A0 =A00 =A02625752 =A083036 = =A0 =A0 - =A0 =A0 =A0 =A00 > 0.6 =A02.0 /Users/xxx/Deskt =A0 501 62068 0 5:38AM ttys001 =A0 =A0 =A0400= 6 > 48 =A00 - =A0 =A0 =A0ffffff8012762000 > > I am running on Lion, Macbook Air. =A0does this help? just in case this is helpful, I see the same increase in RSS using emacs 23.3 too, but not under linux. is this a problem, or is this increase in RSS normal?