Next: Garbage Collection, Previous: Building Emacs, Up: GNU Emacs Internals
Emacs Lisp uses two kinds of storage for user-created Lisp objects: normal storage and pure storage. Normal storage is where all the new data created during an Emacs session are kept; see the following section for information on normal storage. Pure storage is used for certain data in the preloaded standard Lisp files—data that should never change during actual use of Emacs.
Pure storage is allocated only while temacs is loading the
standard preloaded Lisp libraries. In the file emacs, it is
marked as read-only (on operating systems that permit this), so that
the memory space can be shared by all the Emacs jobs running on the
machine at once. Pure storage is not expandable; a fixed amount is
allocated when Emacs is compiled, and if that is not sufficient for
the preloaded libraries, temacs allocates dynamic memory for
the part that didn't fit. If that happens, you should increase the
compilation parameter PURESIZE in the file
src/puresize.h and rebuild Emacs, even though the resulting
image will work: garbage collection is disabled in this situation,
causing a memory leak. Such an overflow normally won't happen unless you
try to preload additional libraries or add features to the standard
ones. Emacs will display a warning about the overflow when it
starts.
This function makes a copy in pure storage of object, and returns it. It copies a string by simply making a new string with the same characters, but without text properties, in pure storage. It recursively copies the contents of vectors and cons cells. It does not make copies of other objects such as symbols, but just returns them unchanged. It signals an error if asked to copy markers.
This function is a no-op except while Emacs is being built and dumped; it is usually called only in the file emacs/lisp/loaddefs.el, but a few packages call it just in case you decide to preload them.
The value of this variable is the number of bytes of pure storage allocated so far. Typically, in a dumped Emacs, this number is very close to the total amount of pure storage available—if it were not, we would preallocate less.
This variable determines whether
defunshould make a copy of the function definition in pure storage. If it is non-nil, then the function definition is copied into pure storage.This flag is
twhile loading all of the basic functions for building Emacs initially (allowing those functions to be sharable and non-collectible). Dumping Emacs as an executable always writesnilin this variable, regardless of the value it actually has before and after dumping.You should not change this flag in a running Emacs.
