From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: Memory again Date: Thu, 5 Jan 2012 23:37:54 +0100 Message-ID: <6F8FEE75-2ED4-45A7-85B9-305EE51B5A04@swipnet.se> References: <71677AF5-0EE7-426E-B8FA-C2782B3CC36C@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1325803091 16063 80.91.229.12 (5 Jan 2012 22:38:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2012 22:38:11 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: emacs user Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 05 23:38:06 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 1Rivwi-00084k-AM for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2012 23:38:04 +0100 Original-Received: from localhost ([::1]:34705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rivwh-0006Y8-F7 for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2012 17:38:03 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:45031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rivwe-0006Y1-Va for emacs-devel@gnu.org; Thu, 05 Jan 2012 17:38:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rivwd-0002LH-G0 for emacs-devel@gnu.org; Thu, 05 Jan 2012 17:38:00 -0500 Original-Received: from mailout.melmac.se ([62.20.26.67]:33412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rivwd-0002L0-1o for emacs-devel@gnu.org; Thu, 05 Jan 2012 17:37:59 -0500 Original-Received: from mail01.melmac.se (mail01.melmac.se [62.20.26.80]) by mailout.melmac.se (Postfix) with ESMTP id AC73D91FB for ; Thu, 5 Jan 2012 23:37:54 +0100 (CET) Original-Received: (qmail 28143 invoked by uid 89); 5 Jan 2012 22:36:50 -0000 Original-Received: from h-46-59-42-18.na.cust.bahnhof.se (HELO coolsville.localdomain) (boel.djarv@bdtv.se@46.59.42.18) by mail01.melmac.se with ESMTPA; 5 Jan 2012 22:36:50 -0000 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id DCB907FA058; Thu, 5 Jan 2012 23:37:53 +0100 (CET) In-Reply-To: X-Mailer: Apple Mail (2.1251.1) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 62.20.26.67 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:147359 Archived-At: Hello. I see this increase also. Memory does not seem to be given back to the = system on OSX. Maybe we should try using gmalloc on OSX. There is problem however, the = unexec for OSX uses a special malloc for temacs and the normal one for the dumped = emacs. I'm not even sure gmalloc works on OSX. Jan D. 5 jan 2012 kl. 07:13 skrev emacs user: > On Fri, Dec 23, 2011 at 12:44 PM, emacs user = wrote: >> On Fri, Dec 23, 2011 at 2:39 AM, Stefan Monnier >>=20 >>> 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. So = it >>> looks like that data is held by the C code. >>>=20 >>> 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. >>>=20 >>>=20 >>> Stefan >>=20 >> 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. >>=20 >> start emacs: >> $ ~/Desktop/Emacs.app/Contents/MacOS/Emacs -Q& >>=20 >> create a file that contains the following line many times >> asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf = asdf >> $ wc t : 687456 10311840 52246656 t >> $ ls -l t: -rw------- 1 x staff 52246656 Dec 23 05:08 t >>=20 >> edit it using the above emacs. >> kill all buffers, do M-x garbage-collect >>=20 >> look at the process: >>=20 >> $ ps -vefl | head -1 >> PID STAT TIME SL RE PAGEIN VSZ RSS LIM TSIZ >> %CPU %MEM COMMAND UID PPID C STIME TTY F >> PRI NI WCHAN ADDR >>=20 >> before editing the file: >> $ ps -vefl | grep 62764 >> 62764 S 0:00.78 0 0 0 2571020 30852 - 0 >> 0.3 0.7 /Users/xxx/Deskt 501 62068 0 5:38AM ttys001 4006 >> 49 0 - ffffff8012762000 >>=20 >> after editing it, killing the buffer, and doing M-x garbage-collect >> $ ps -vefl | grep 62764 >> 62764 S 0:01.85 0 0 0 2625752 83036 - 0 >> 0.6 2.0 /Users/xxx/Deskt 501 62068 0 5:38AM ttys001 4006 >> 48 0 - ffffff8012762000 >>=20 >> I am running on Lion, Macbook Air. does this help? >=20 > 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?