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: Fri, 23 Dec 2011 12:44:42 +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 1324637107 4950 80.91.229.12 (23 Dec 2011 10:45:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Dec 2011 10:45:07 +0000 (UTC) Cc: =?ISO-8859-1?Q?Jan_Dj=E4rv?= , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 23 11:45:02 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 1Re2cY-0007Sr-3L for ged-emacs-devel@m.gmane.org; Fri, 23 Dec 2011 11:45:02 +0100 Original-Received: from localhost ([::1]:50274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Re2cX-0003O0-KR for ged-emacs-devel@m.gmane.org; Fri, 23 Dec 2011 05:45:01 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:43127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Re2cQ-0003Nc-5Q for emacs-devel@gnu.org; Fri, 23 Dec 2011 05:44:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Re2cF-0004KH-Fz for emacs-devel@gnu.org; Fri, 23 Dec 2011 05:44:54 -0500 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:59027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Re2cF-0004K7-Ak for emacs-devel@gnu.org; Fri, 23 Dec 2011 05:44:43 -0500 Original-Received: by wgbdt11 with SMTP id dt11so13776810wgb.30 for ; Fri, 23 Dec 2011 02:44:42 -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=eeOGYnyIzsf2HC4YzMvb4RMMtNHx85s8vkCb7alc28E=; b=vdQIugiLn9bAciwBxo/xCB5cTQWlV/EjWUZcxIDgGdMDIctmhbkWzgiskXALCohN9g +P2PVd+Kj2fRuHr3JLk3xQodNIm/rv41QRGZwYOaw5jNHvuiQLpXBYzNN4bRTA/CLPZx 8zPtQTqXBF0DDDS/OHttaB+ugmYStMrRTiL00= Original-Received: by 10.227.60.4 with SMTP id n4mr13839375wbh.9.1324637082152; Fri, 23 Dec 2011 02:44:42 -0800 (PST) Original-Received: by 10.216.170.138 with HTTP; Fri, 23 Dec 2011 02:44:42 -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.49 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:146943 Archived-At: 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 asdf $ wc t : 687456 10311840 52246656 t $ ls -l t: -rw------- 1 x staff 52246656 Dec 23 05:08 t edit it using the above emacs. kill all buffers, do M-x garbage-collect look at the process: $ 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 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 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 I am running on Lion, Macbook Air. does this help?