aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2003-12-25 03:52:43 +0000
committerLuc Teirlinck2003-12-25 03:52:43 +0000
commit568ffbeed8969f6031d99b06c58b10bc963f8511 (patch)
treec2c36507e206a368f1967c556d5f51bf0242a759
parent74ab3aa34adc0dc51e825e22fed1be7f89a09fbf (diff)
downloademacs-568ffbeed8969f6031d99b06c58b10bc963f8511.tar.gz
emacs-568ffbeed8969f6031d99b06c58b10bc963f8511.zip
(Pure Storage): Mention that `purecopy' does not copy text properties.
(Object Internals): Now 29 bits are used (in most implementations) to address Lisp objects.
-rw-r--r--lispref/internals.texi30
1 files changed, 16 insertions, 14 deletions
diff --git a/lispref/internals.texi b/lispref/internals.texi
index c8cf5ed0f7c..2a4572560a7 100644
--- a/lispref/internals.texi
+++ b/lispref/internals.texi
@@ -81,8 +81,9 @@ faster. On modern machines, it is usually not advisable.
81 81
82 After @file{loadup.el} reads @file{site-load.el}, it finds the 82 After @file{loadup.el} reads @file{site-load.el}, it finds the
83documentation strings for primitive and preloaded functions (and 83documentation strings for primitive and preloaded functions (and
84variables) in the file @file{etc/DOC} where they are stored, by calling 84variables) in the file @file{etc/DOC} where they are stored, by
85@code{Snarf-documentation} (@pxref{Accessing Documentation}). 85calling @code{Snarf-documentation} (@pxref{Definition of
86Snarf-documentation,, Accessing Documentation}).
86 87
87@cindex @file{site-init.el} 88@cindex @file{site-init.el}
88 You can specify other Lisp expressions to execute just before dumping 89 You can specify other Lisp expressions to execute just before dumping
@@ -151,10 +152,10 @@ preload additional libraries or add features to the standard ones.
151@defun purecopy object 152@defun purecopy object
152This function makes a copy in pure storage of @var{object}, and returns 153This function makes a copy in pure storage of @var{object}, and returns
153it. It copies a string by simply making a new string with the same 154it. It copies a string by simply making a new string with the same
154characters in pure storage. It recursively copies the contents of 155characters, but without text properties, in pure storage. It
155vectors and cons cells. It does not make copies of other objects such 156recursively copies the contents of vectors and cons cells. It does
156as symbols, but just returns them unchanged. It signals an error if 157not make copies of other objects such as symbols, but just returns
157asked to copy markers. 158them unchanged. It signals an error if asked to copy markers.
158 159
159This function is a no-op except while Emacs is being built and dumped; 160This function is a no-op except while Emacs is being built and dumped;
160it is usually called only in the file @file{emacs/lisp/loaddefs.el}, but 161it is usually called only in the file @file{emacs/lisp/loaddefs.el}, but
@@ -367,7 +368,7 @@ until the subsequent garbage collection, at which time
367@code{garbage-collect} will set the threshold back to 10,000. 368@code{garbage-collect} will set the threshold back to 10,000.
368@end defopt 369@end defopt
369 370
370 The value return by @code{garbage-collect} describes the amount of 371 The value returned by @code{garbage-collect} describes the amount of
371memory used by Lisp data, broken down by data type. By contrast, the 372memory used by Lisp data, broken down by data type. By contrast, the
372function @code{memory-limit} provides information on the total amount of 373function @code{memory-limit} provides information on the total amount of
373memory Emacs is currently using. 374memory Emacs is currently using.
@@ -595,9 +596,9 @@ protected in the current function. It is necessary to do this explicitly.
595GC-protected; as long as the object is not recycled, all pointers to 596GC-protected; as long as the object is not recycled, all pointers to
596it remain valid. So if you are sure that a local variable points to 597it remain valid. So if you are sure that a local variable points to
597an object that will be preserved by some other pointer, that local 598an object that will be preserved by some other pointer, that local
598variable does not need a GCPRO. (Formerly, strings were an exception 599variable does not need a @code{GCPRO}. (Formerly, strings were an
599to this rule; in older Emacs versions, every pointer to a string 600exception to this rule; in older Emacs versions, every pointer to a
600needed to be marked by GC.) 601string needed to be marked by GC.)
601 602
602 The macro @code{GCPRO1} protects just one local variable. If you 603 The macro @code{GCPRO1} protects just one local variable. If you
603want to protect two, use @code{GCPRO2} instead; repeating 604want to protect two, use @code{GCPRO2} instead; repeating
@@ -612,7 +613,7 @@ Alas, we can't explain all the tricky details here.
612accept two arguments at the C level: the number of Lisp arguments, and 613accept two arguments at the C level: the number of Lisp arguments, and
613a @code{Lisp_Object *} pointer to a C vector containing those Lisp 614a @code{Lisp_Object *} pointer to a C vector containing those Lisp
614arguments. This C vector may be part of a Lisp vector, but it need 615arguments. This C vector may be part of a Lisp vector, but it need
615not be. The responsibility for using GCPRO to protecting the Lisp 616not be. The responsibility for using @code{GCPRO} to protect the Lisp
616arguments from GC if necessary rests with the caller in this case, 617arguments from GC if necessary rests with the caller in this case,
617since the caller allocated or found the storage for them. 618since the caller allocated or found the storage for them.
618 619
@@ -651,6 +652,7 @@ file, add to it a @code{syms_of_@var{filename}} (e.g.,
651of these functions are called, and add a call to 652of these functions are called, and add a call to
652@code{syms_of_@var{filename}} there. 653@code{syms_of_@var{filename}} there.
653 654
655@anchor{Defining Lisp variables in C}
654@vindex byte-boolean-vars 656@vindex byte-boolean-vars
655 The function @code{syms_of_@var{filename}} is also the place to define 657 The function @code{syms_of_@var{filename}} is also the place to define
656any C variables that are to be visible as Lisp variables. 658any C variables that are to be visible as Lisp variables.
@@ -761,9 +763,9 @@ knows about it.
761data are stored in a heap and the only access that programs have to it 763data are stored in a heap and the only access that programs have to it
762is through pointers. Pointers are thirty-two bits wide in most 764is through pointers. Pointers are thirty-two bits wide in most
763implementations. Depending on the operating system and type of machine 765implementations. Depending on the operating system and type of machine
764for which you compile Emacs, twenty-eight bits are used to address the 766for which you compile Emacs, twenty-nine bits are used to address the
765object, and the remaining four bits are used for a GC mark bit and the 767object, and the remaining three bits are used for the tag that
766tag that identifies the object's type. 768identifies the object's type.
767 769
768 Because Lisp objects are represented as tagged pointers, it is always 770 Because Lisp objects are represented as tagged pointers, it is always
769possible to determine the Lisp data type of any object. The C data type 771possible to determine the Lisp data type of any object. The C data type