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: size of emacs executable after unicode merge Date: Sat, 17 May 2008 10:52:33 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <200805140351.m4E3pQuE004549@sallyv1.ics.uci.edu> <200805141652.m4EGqikr018644@sallyv1.ics.uci.edu> <200805151529.m4FFTlF1004684@sallyv1.ics.uci.edu> <482D8435.6060407@gnu.org> 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: ger.gmane.org 1210989185 29019 80.91.229.12 (17 May 2008 01:53:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 May 2008 01:53:05 +0000 (UTC) Cc: dann@ics.uci.edu, emacs-devel@gnu.org, rms@gnu.org, evilborisnet@netscape.net, Jason Rumney To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 17 03:53:41 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JxBcC-0002S9-Qv for ged-emacs-devel@m.gmane.org; Sat, 17 May 2008 03:53:41 +0200 Original-Received: from localhost ([127.0.0.1]:46288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JxBbT-0001VZ-72 for ged-emacs-devel@m.gmane.org; Fri, 16 May 2008 21:52:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JxBbP-0001VL-BX for emacs-devel@gnu.org; Fri, 16 May 2008 21:52:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JxBbO-0001V9-52 for emacs-devel@gnu.org; Fri, 16 May 2008 21:52:51 -0400 Original-Received: from [199.232.76.173] (port=58797 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JxBbO-0001V6-1l for emacs-devel@gnu.org; Fri, 16 May 2008 21:52:50 -0400 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2]:62347 helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JxBbC-0005lU-M2; Fri, 16 May 2008 21:52:39 -0400 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 A49352C40; Sat, 17 May 2008 10:52:33 +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/23.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-kernel: by monty-python.gnu.org: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:97307 Archived-At: >>>>> On Sat, 17 May 2008 09:56:58 +0900, Kenichi Handa said: > They are surely loaded on demand. And, at the end of the dumping > process, by calling clear-charset-maps, all loaded maps are set to > nil, and then garbage-collect is called. So I think they are not > included in the dumped Emacs. Perhaps some other char-table is the > culprit. Maybe Vchar_unify_table. I must re-read src/charset.c. I tried taking some heap statistics during loadup on Mac OS X. It would be interesting to focus on the changes in the numbers of 1024-byte blocks and 48-byte blocks as they are major factors of the increase/decrease. The major increases in the used heap size are observed at the load of international/mule-conf (564KB -> 8897KB) and international/characters (9627KB -> 14685KB). Before loading international/mule-conf: Overall size: 9359KB; 1512 nodes malloced for 564KB (6% of capacity); largest unused: [0x1855e00-7848KB] # of 1024-byte blocks: 193 # of 48-byte blocks: 959 After loading international/mule-conf: Overall size: 9623KB; 18028 nodes malloced for 8897KB (92% of capacity); largest unused: [0xe89920-473KB] # of 1024-byte blocks: 7858 # of 48-byte blocks: 9035 Before loading international/characters: Overall size: 18123KB; 19500 nodes malloced for 9627KB (53% of capacity); largest unused: [0x2041e00-7928KB] # of 1024-byte blocks: 8106 # of 48-byte blocks: 9969 After loading international/characters: Overall size: 23243KB; 102539 nodes malloced for 14685KB (63% of capacity); largest unused: [0x2155800-6825KB] # of 1024-byte blocks: 9358 # of 48-byte blocks: 91721 The clear-charset-maps call followed by garbage-collect surely reduces the size of the used area (15958KB -> 9188KB), but the unused area is not returned to the system at least on Mac OS X (i.e., "Overall size" does not change). Before clear-charset-maps: Overall size: 23703KB; 105317 nodes malloced for 15958KB (67% of capacity); largest unused: [0x222c000-5967KB] # of 1024-byte blocks: 9865 # of 48-byte blocks: 92577 After clear-charset-maps with garbage-collect: Overall size: 23703KB; 91717 nodes malloced for 9188KB (38% of capacity); largest unused: [0x222c000-5967KB] # of 1024-byte blocks: 3484 # of 48-byte blocks: 85777 FYI, below is the final result of Emacs 22.2.50. Overall size: 10023KB; 18828 nodes malloced for 3319KB (33% of capacity); largest unused: [0x19ae000-6471KB] # of 1024-byte blocks: 1245 # of 48-byte blocks: 15510 YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp