comparison man/lispref/building.texi @ 2818:9fa10603c898

[xemacs-hg @ 2005-06-19 20:49:43 by aidan] Pure storage is long gone.
author aidan
date Sun, 19 Jun 2005 20:49:47 +0000
parents 87e011e66a78
children 9fae6227ede5
comparison
equal deleted inserted replaced
2817:9244a70250d8 2818:9fa10603c898
15 build process, the allocation and garbage-collection process, and other 15 build process, the allocation and garbage-collection process, and other
16 aspects related to the internals of XEmacs. 16 aspects related to the internals of XEmacs.
17 17
18 @menu 18 @menu
19 * Building XEmacs:: How to preload Lisp libraries into XEmacs. 19 * Building XEmacs:: How to preload Lisp libraries into XEmacs.
20 * Pure Storage:: A kludge to make preloaded Lisp functions sharable.
21 * Garbage Collection:: Reclaiming space for Lisp objects no longer used. 20 * Garbage Collection:: Reclaiming space for Lisp objects no longer used.
22 @end menu 21 @end menu
23 22
24 @node Building XEmacs 23 @node Building XEmacs
25 @appendixsec Building XEmacs 24 @appendixsec Building XEmacs
32 information is pertinent to XEmacs maintenance. 31 information is pertinent to XEmacs maintenance.
33 32
34 The @cite{XEmacs Internals Manual} contains more information about this. 33 The @cite{XEmacs Internals Manual} contains more information about this.
35 34
36 Compilation of the C source files in the @file{src} directory 35 Compilation of the C source files in the @file{src} directory
37 produces an executable file called @file{temacs}, also called a 36 produces an executable file called @file{temacs}. It contains the
38 @dfn{bare impure XEmacs}. It contains the XEmacs Lisp interpreter and I/O 37 XEmacs Lisp interpreter and I/O routines, but not the editing commands.
39 routines, but not the editing commands.
40 38
41 @cindex @file{loadup.el} 39 @cindex @file{loadup.el}
42 Before XEmacs is actually usable, a number of Lisp files need to be 40 Before XEmacs is actually usable, a number of Lisp files need to be
43 loaded. These define all the editing commands, plus most of the startup 41 loaded. These define all the editing commands, plus most of the startup
44 code and many very basic Lisp primitives. This is accomplished by 42 code and many very basic Lisp primitives. This is accomplished by
78 files. However, you also need the compiled Lisp files in order to dump 76 files. However, you also need the compiled Lisp files in order to dump
79 out @file{xemacs}. If both of these are missing or corrupted, you are 77 out @file{xemacs}. If both of these are missing or corrupted, you are
80 out of luck unless you're able to bootstrap @file{xemacs} from 78 out of luck unless you're able to bootstrap @file{xemacs} from
81 @file{temacs}. Note that @samp{make all-elc} actually loads the 79 @file{temacs}. Note that @samp{make all-elc} actually loads the
82 alternative loadup file @file{loadup-el.el}, which works like 80 alternative loadup file @file{loadup-el.el}, which works like
83 @file{loadup.el} but disables the pure-copying process and forces 81 @file{loadup.el} but forces XEmacs to ignore any compiled Lisp files
84 XEmacs to ignore any compiled Lisp files even if they exist.) 82 even if they exist.)
85 83
86 @cindex @file{site-load.el} 84 @cindex @file{site-load.el}
87 You can specify additional files to preload by writing a library named 85 You can specify additional files to preload by writing a library named
88 @file{site-load.el} that loads them. You may need to increase the value 86 @file{site-load.el} that loads them. However, the advantage of
89 of @code{PURESIZE}, in @file{src/puresize.h}, to make room for the
90 additional files. You should @emph{not} modify this file directly,
91 however; instead, use the @samp{--puresize} configuration option. (If
92 you run out of pure space while dumping @file{xemacs}, you will be told
93 how much pure space you actually will need.) However, the advantage of
94 preloading additional files decreases as machines get faster. On modern 87 preloading additional files decreases as machines get faster. On modern
95 machines, it is often not advisable, especially if the Lisp code is 88 machines, it is often not advisable, especially if the Lisp code is
96 on a file system local to the machine running XEmacs. 89 on a file system local to the machine running XEmacs.
97 90
98 @cindex @file{site-init.el} 91 @cindex @file{site-init.el}
174 @end defvar 167 @end defvar
175 168
176 @defvar emacs-minor-version 169 @defvar emacs-minor-version
177 The minor version number of Emacs, as an integer. For XEmacs version 170 The minor version number of Emacs, as an integer. For XEmacs version
178 20.1, the value is 1. 171 20.1, the value is 1.
179 @end defvar
180
181 @node Pure Storage
182 @appendixsec Pure Storage
183 @cindex pure storage
184
185 XEmacs Lisp uses two kinds of storage for user-created Lisp objects:
186 @dfn{normal storage} and @dfn{pure storage}. Normal storage is where
187 all the new data created during an XEmacs session is kept; see the
188 following section for information on normal storage. Pure storage is
189 used for certain data in the preloaded standard Lisp files---data that
190 should never change during actual use of XEmacs.
191
192 Pure storage is allocated only while @file{temacs} is loading the
193 standard preloaded Lisp libraries. In the file @file{xemacs}, it is
194 marked as read-only (on operating systems that permit this), so that the
195 memory space can be shared by all the XEmacs jobs running on the machine
196 at once. Pure storage is not expandable; a fixed amount is allocated
197 when XEmacs is compiled, and if that is not sufficient for the preloaded
198 libraries, @file{temacs} aborts with an error message. If that happens,
199 you must increase the compilation parameter @code{PURESIZE} using the
200 @samp{--puresize} option to @file{configure}. This normally won't
201 happen unless you try to preload additional libraries or add features to
202 the standard ones.
203
204 @defun purecopy object
205 This function makes a copy of @var{object} in pure storage and returns
206 it. It copies strings by simply making a new string with the same
207 characters in pure storage. It recursively copies the contents of
208 vectors and cons cells. It does not make copies of other objects such
209 as symbols, but just returns them unchanged. It signals an error if
210 asked to copy markers.
211
212 This function is a no-op in XEmacs, and its use is deprecated.
213 @end defun
214
215 @defvar pure-bytes-used
216 The value of this variable is the number of bytes of pure storage
217 allocated so far. Typically, in a dumped XEmacs, this number is very
218 close to the total amount of pure storage available---if it were not,
219 we would preallocate less.
220 @end defvar
221
222 @defvar purify-flag
223 This variable determines whether @code{defun} should make a copy of the
224 function definition in pure storage. If it is non-@code{nil}, then the
225 function definition is copied into pure storage.
226
227 This flag is @code{t} while loading all of the basic functions for
228 building XEmacs initially (allowing those functions to be sharable and
229 non-collectible). Dumping XEmacs as an executable always writes
230 @code{nil} in this variable, regardless of the value it actually has
231 before and after dumping.
232
233 You should not change this flag in a running XEmacs.
234 @end defvar 172 @end defvar
235 173
236 @node Garbage Collection 174 @node Garbage Collection
237 @appendixsec Garbage Collection 175 @appendixsec Garbage Collection
238 @cindex garbage collector 176 @cindex garbage collector