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: Building Emacs overflowed pure space Date: Thu, 20 Jul 2006 11:13:52 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <7dbe73ed0607180138x35e9d9bft3e42f20cb369795c@mail.gmail.com> <200607181929.k6IJTZN9028639@jane.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1153361691 5071 80.91.229.2 (20 Jul 2006 02:14:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Jul 2006 02:14:51 +0000 (UTC) Cc: emacs-devel@gnu.org, Luc Teirlinck , rms@gnu.org, ralphm@members.fsf.org, mathias.dahl@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 20 04:14:45 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G3O3G-0003Cl-BS for ged-emacs-devel@m.gmane.org; Thu, 20 Jul 2006 04:14:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3O3F-0007DF-RR for ged-emacs-devel@m.gmane.org; Wed, 19 Jul 2006 22:14:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G3O34-0007Cx-Hy for emacs-devel@gnu.org; Wed, 19 Jul 2006 22:13:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G3O32-0007CZ-Q5 for emacs-devel@gnu.org; Wed, 19 Jul 2006 22:13:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3O32-0007CW-K3 for emacs-devel@gnu.org; Wed, 19 Jul 2006 22:13:56 -0400 Original-Received: from [133.82.132.2] (helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G3O36-0004Lo-S0; Wed, 19 Jul 2006 22:14:01 -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 A521D2CAA; Thu, 20 Jul 2006 11:13:52 +0900 (JST) Original-To: Stefan Monnier In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) 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:57361 Archived-At: >>>>> On Wed, 19 Jul 2006 11:05:39 -0400, Stefan Monnier said: > Also `make-symbol' allocates a fixed amount of memory AFAIK, > independent from the symbol name's length (it keeps a ref to the > string argument, instead, so that (eq X (symbol-name (make-symbol > X))) is always true), and the "--cl-dolist-temp--" string should > only be allocated once (when reading the macro definition). So the > only explanation that I can find is that the uninterned symbol names > get copied to purespace at some point (don't know when or why), at > which point the single shared string "--cl-dolist-temp--" gets > copied N times. It is allocated when .elc file is loaded. Each compiled `dolist' contains the uninterned symbol #:--cl-dolist-temp--, and its name is allocated through the following path: lread.c:read1 2780 Lisp_Object result = uninterned_symbol ? make_symbol (read_buffer) 2781 : intern (read_buffer); lread.c:make_symbol 3294 return Fmake_symbol ((!NILP (Vpurify_flag) 3295 ? make_pure_string (str, len, len, 0) 3296 : make_string (str, len))); alloc.c:make_pure_string 4787 s = (struct Lisp_String *) pure_alloc (sizeof *s, Lisp_String); 4788 s->data = (unsigned char *) pure_alloc (nbytes + 1, -1); YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp