diff options
| author | Luc Teirlinck | 2003-12-25 03:52:43 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2003-12-25 03:52:43 +0000 |
| commit | 568ffbeed8969f6031d99b06c58b10bc963f8511 (patch) | |
| tree | c2c36507e206a368f1967c556d5f51bf0242a759 | |
| parent | 74ab3aa34adc0dc51e825e22fed1be7f89a09fbf (diff) | |
| download | emacs-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.texi | 30 |
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 |
| 83 | documentation strings for primitive and preloaded functions (and | 83 | documentation strings for primitive and preloaded functions (and |
| 84 | variables) in the file @file{etc/DOC} where they are stored, by calling | 84 | variables) in the file @file{etc/DOC} where they are stored, by |
| 85 | @code{Snarf-documentation} (@pxref{Accessing Documentation}). | 85 | calling @code{Snarf-documentation} (@pxref{Definition of |
| 86 | Snarf-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 |
| 152 | This function makes a copy in pure storage of @var{object}, and returns | 153 | This function makes a copy in pure storage of @var{object}, and returns |
| 153 | it. It copies a string by simply making a new string with the same | 154 | it. It copies a string by simply making a new string with the same |
| 154 | characters in pure storage. It recursively copies the contents of | 155 | characters, but without text properties, in pure storage. It |
| 155 | vectors and cons cells. It does not make copies of other objects such | 156 | recursively copies the contents of vectors and cons cells. It does |
| 156 | as symbols, but just returns them unchanged. It signals an error if | 157 | not make copies of other objects such as symbols, but just returns |
| 157 | asked to copy markers. | 158 | them unchanged. It signals an error if asked to copy markers. |
| 158 | 159 | ||
| 159 | This function is a no-op except while Emacs is being built and dumped; | 160 | This function is a no-op except while Emacs is being built and dumped; |
| 160 | it is usually called only in the file @file{emacs/lisp/loaddefs.el}, but | 161 | it 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 |
| 371 | memory used by Lisp data, broken down by data type. By contrast, the | 372 | memory used by Lisp data, broken down by data type. By contrast, the |
| 372 | function @code{memory-limit} provides information on the total amount of | 373 | function @code{memory-limit} provides information on the total amount of |
| 373 | memory Emacs is currently using. | 374 | memory Emacs is currently using. |
| @@ -595,9 +596,9 @@ protected in the current function. It is necessary to do this explicitly. | |||
| 595 | GC-protected; as long as the object is not recycled, all pointers to | 596 | GC-protected; as long as the object is not recycled, all pointers to |
| 596 | it remain valid. So if you are sure that a local variable points to | 597 | it remain valid. So if you are sure that a local variable points to |
| 597 | an object that will be preserved by some other pointer, that local | 598 | an object that will be preserved by some other pointer, that local |
| 598 | variable does not need a GCPRO. (Formerly, strings were an exception | 599 | variable does not need a @code{GCPRO}. (Formerly, strings were an |
| 599 | to this rule; in older Emacs versions, every pointer to a string | 600 | exception to this rule; in older Emacs versions, every pointer to a |
| 600 | needed to be marked by GC.) | 601 | string 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 |
| 603 | want to protect two, use @code{GCPRO2} instead; repeating | 604 | want to protect two, use @code{GCPRO2} instead; repeating |
| @@ -612,7 +613,7 @@ Alas, we can't explain all the tricky details here. | |||
| 612 | accept two arguments at the C level: the number of Lisp arguments, and | 613 | accept two arguments at the C level: the number of Lisp arguments, and |
| 613 | a @code{Lisp_Object *} pointer to a C vector containing those Lisp | 614 | a @code{Lisp_Object *} pointer to a C vector containing those Lisp |
| 614 | arguments. This C vector may be part of a Lisp vector, but it need | 615 | arguments. This C vector may be part of a Lisp vector, but it need |
| 615 | not be. The responsibility for using GCPRO to protecting the Lisp | 616 | not be. The responsibility for using @code{GCPRO} to protect the Lisp |
| 616 | arguments from GC if necessary rests with the caller in this case, | 617 | arguments from GC if necessary rests with the caller in this case, |
| 617 | since the caller allocated or found the storage for them. | 618 | since 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., | |||
| 651 | of these functions are called, and add a call to | 652 | of 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 |
| 656 | any C variables that are to be visible as Lisp variables. | 658 | any C variables that are to be visible as Lisp variables. |
| @@ -761,9 +763,9 @@ knows about it. | |||
| 761 | data are stored in a heap and the only access that programs have to it | 763 | data are stored in a heap and the only access that programs have to it |
| 762 | is through pointers. Pointers are thirty-two bits wide in most | 764 | is through pointers. Pointers are thirty-two bits wide in most |
| 763 | implementations. Depending on the operating system and type of machine | 765 | implementations. Depending on the operating system and type of machine |
| 764 | for which you compile Emacs, twenty-eight bits are used to address the | 766 | for which you compile Emacs, twenty-nine bits are used to address the |
| 765 | object, and the remaining four bits are used for a GC mark bit and the | 767 | object, and the remaining three bits are used for the tag that |
| 766 | tag that identifies the object's type. | 768 | identifies 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 |
| 769 | possible to determine the Lisp data type of any object. The C data type | 771 | possible to determine the Lisp data type of any object. The C data type |