From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Emacs 23 Mac port Date: Tue, 17 Jan 2012 19:51:12 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1326797498 31873 80.91.229.12 (17 Jan 2012 10:51:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Jan 2012 10:51:38 +0000 (UTC) Cc: railwaycat@gmail.com, Jan =?ISO-8859-1?Q?Dj=E4rv?= , emacs-devel@gnu.org To: emacs user Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 17 11:51:33 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 1Rn6dV-0005r5-Nw for ged-emacs-devel@m.gmane.org; Tue, 17 Jan 2012 11:51:29 +0100 Original-Received: from localhost ([::1]:53685 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rn6dV-00064R-3Z for ged-emacs-devel@m.gmane.org; Tue, 17 Jan 2012 05:51:29 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:36549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rn6dP-00062V-Ho for emacs-devel@gnu.org; Tue, 17 Jan 2012 05:51:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rn6dJ-00069b-Gv for emacs-devel@gnu.org; Tue, 17 Jan 2012 05:51:23 -0500 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:56007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rn6dJ-00069D-1g for emacs-devel@gnu.org; Tue, 17 Jan 2012 05:51:17 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id B84B0C055D; Tue, 17 Jan 2012 19:51:12 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: NetBSD 3.0 (DF) X-Received-From: 133.82.132.2 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:147700 Archived-At: >>>>> On Tue, 17 Jan 2012 12:47:38 +0900, YAMAMOTO Mitsuharu said: >> This version seems to have the same memory problem (not returning >> memory to the OS) as the regular gnu emacs on OS X. Aquamacs seems >> not to have this issue...(?) > My guess is that Aquamacs is in 32-bit and the others are in 64-bit. I browsed the source code of the malloc library on Mac OS X 10.7.2, and found that actually this difference of 32-bit vs. 64-bit affects the behavior of caching. For machines equipped with >= 1GB RAM, allocation for size >= 128kB is handled by the "large" version of malloc/free etc. And some large allocations are cached by the malloc library. For 64-bit executables, up to 16 cache entries and each entry is up to 128MB. For 32-bit executables, up to 8 cache entries and each entry is up to 4MB. For both cases, the total cache size is up to 0.1% of RAM. So if you kill 3 buffers each of which occupies 5MB in size on a 16GB RAM machine, then 15MB memory is kept as cache by the malloc library for the 64-bit case even after garbage collection, while it is returned to the system for the 32-bit case. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp