From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: Memory again Date: Tue, 06 Dec 2011 14:24:11 +0400 Message-ID: <4EDDED4B.7030607@yandex.ru> References: <4ED0F945.5090805@yandex.ru> <83pqge7syw.fsf@gnu.org> <87mxb6tkji.fsf@wanadoo.es> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1323167067 28200 80.91.229.12 (6 Dec 2011 10:24:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Dec 2011 10:24:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 06 11:24:23 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 1RXsCF-0005xt-4Y for ged-emacs-devel@m.gmane.org; Tue, 06 Dec 2011 11:24:23 +0100 Original-Received: from localhost ([::1]:58897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXsCE-0001XO-Lo for ged-emacs-devel@m.gmane.org; Tue, 06 Dec 2011 05:24:22 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:46320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXsC7-0001XC-QU for emacs-devel@gnu.org; Tue, 06 Dec 2011 05:24:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXsC3-0006hM-Oz for emacs-devel@gnu.org; Tue, 06 Dec 2011 05:24:15 -0500 Original-Received: from mail.dev.rtsoft.ru ([213.79.90.226]:40866) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RXsC3-0006ga-4y for emacs-devel@gnu.org; Tue, 06 Dec 2011 05:24:11 -0500 Original-Received: (qmail 8488 invoked from network); 6 Dec 2011 10:24:06 -0000 Original-Received: from unknown (HELO ?192.168.5.146?) (192.168.1.70) by 0 with SMTP; 6 Dec 2011 10:24:06 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 213.79.90.226 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:146496 Archived-At: On 12/06/2011 01:35 PM, Carsten Mattner wrote: > I still believe this is what's happening for me on Linux 3.x and Darwin 10.7.x > when I kill a buffer and the claimed memory is not given back to the kernel. Yes, it's very easy to reproduce. Generate the following C code: #warning oops0 #warning oops1 /* a lot of */ #warning oops999999 main () {} then M-x compile it, wait a lot until it's done, then kill *compilation* buffer and see RSS. I tried with 1M of #warnings, and (buffer-size *compilation*) was 58M - but RSS grows to 2250M. During compilation, strace shows an excessive usage both of mremap() (for buffer text, I suppose) and brk(). When I kill *compilation*, munmap() was issued to free buffer text. Next, I call garbage-collect: ((63789 . 19159) (15579 . 0) (45 . 234) 160925 331403 (74 . 320) (696 . 251) (6794 . 10907)) But even after GC, RSS is 2192M. Oops. Dmitry