diff options
| author | Paul Eggert | 2018-08-14 12:07:09 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-08-14 12:08:03 -0700 |
| commit | 11c7c2f758f8f07e7b917fbc93267cee236a80e5 (patch) | |
| tree | abd4c9e192fe6f0a125f54b61b881fff73f58de0 | |
| parent | db6f511eb709def49280ca5ff2f05b2b7cbfd98d (diff) | |
| download | emacs-11c7c2f758f8f07e7b917fbc93267cee236a80e5.tar.gz emacs-11c7c2f758f8f07e7b917fbc93267cee236a80e5.zip | |
Remove more traces of misc (Bug#32405)
Remove misc-objects-consed and the misc component of
memory-use-count, since misc objects no longer exist.
* doc/lispref/internals.texi, etc/NEWS: Mention this,
and adjust better to recent removal of misc objects.
* src/alloc.c (MEM_TYPE_MISC): Remove; no longer used.
(Fmemory_use_counts): Omit misc count, since miscs
no longer exist.
(misc-objects-consed): Remove.
| -rw-r--r-- | doc/lispref/internals.texi | 25 | ||||
| -rw-r--r-- | etc/NEWS | 8 | ||||
| -rw-r--r-- | src/alloc.c | 10 |
3 files changed, 14 insertions, 29 deletions
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index c72dbb50797..3fe28446eaf 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -246,8 +246,8 @@ of 8k bytes, and small vectors are packed into blocks of 4k bytes). | |||
| 246 | 246 | ||
| 247 | @cindex vector-like objects, storage | 247 | @cindex vector-like objects, storage |
| 248 | @cindex storage of vector-like Lisp objects | 248 | @cindex storage of vector-like Lisp objects |
| 249 | Beyond the basic vector, a lot of objects like window, buffer, and | 249 | Beyond the basic vector, a lot of objects like markers, overlays and |
| 250 | frame are managed as if they were vectors. The corresponding C data | 250 | buffers are managed as if they were vectors. The corresponding C data |
| 251 | structures include the @code{union vectorlike_header} field whose | 251 | structures include the @code{union vectorlike_header} field whose |
| 252 | @code{size} member contains the subtype enumerated by @code{enum pvec_type} | 252 | @code{size} member contains the subtype enumerated by @code{enum pvec_type} |
| 253 | and an information about how many @code{Lisp_Object} fields this structure | 253 | and an information about how many @code{Lisp_Object} fields this structure |
| @@ -579,6 +579,8 @@ in this Emacs session. | |||
| 579 | @defvar vector-cells-consed | 579 | @defvar vector-cells-consed |
| 580 | The total number of vector cells that have been allocated so far | 580 | The total number of vector cells that have been allocated so far |
| 581 | in this Emacs session. | 581 | in this Emacs session. |
| 582 | This includes vector-like objects such as markers and overlays, plus | ||
| 583 | certain objects not visible to users. | ||
| 582 | @end defvar | 584 | @end defvar |
| 583 | 585 | ||
| 584 | @defvar symbols-consed | 586 | @defvar symbols-consed |
| @@ -591,12 +593,6 @@ The total number of string characters that have been allocated so far | |||
| 591 | in this session. | 593 | in this session. |
| 592 | @end defvar | 594 | @end defvar |
| 593 | 595 | ||
| 594 | @defvar misc-objects-consed | ||
| 595 | The total number of miscellaneous objects that have been allocated so | ||
| 596 | far in this session. These include markers and overlays, plus | ||
| 597 | certain objects not visible to users. | ||
| 598 | @end defvar | ||
| 599 | |||
| 600 | @defvar intervals-consed | 596 | @defvar intervals-consed |
| 601 | The total number of intervals that have been allocated so far | 597 | The total number of intervals that have been allocated so far |
| 602 | in this Emacs session. | 598 | in this Emacs session. |
| @@ -987,7 +983,7 @@ a special type to represent the pointers to all of them, which is known as | |||
| 987 | In C, the tagged pointer is an object of type @code{Lisp_Object}. Any | 983 | In C, the tagged pointer is an object of type @code{Lisp_Object}. Any |
| 988 | initialized variable of such a type always holds the value of one of the | 984 | initialized variable of such a type always holds the value of one of the |
| 989 | following basic data types: integer, symbol, string, cons cell, float, | 985 | following basic data types: integer, symbol, string, cons cell, float, |
| 990 | vectorlike or miscellaneous object. Each of these data types has the | 986 | or vectorlike object. Each of these data types has the |
| 991 | corresponding tag value. All tags are enumerated by @code{enum Lisp_Type} | 987 | corresponding tag value. All tags are enumerated by @code{enum Lisp_Type} |
| 992 | and placed into a 3-bit bitfield of the @code{Lisp_Object}. The rest of the | 988 | and placed into a 3-bit bitfield of the @code{Lisp_Object}. The rest of the |
| 993 | bits is the value itself. Integers are immediate, i.e., directly | 989 | bits is the value itself. Integers are immediate, i.e., directly |
| @@ -1019,18 +1015,13 @@ Symbol, the unique-named entity commonly used as an identifier. | |||
| 1019 | 1015 | ||
| 1020 | @item struct Lisp_Float | 1016 | @item struct Lisp_Float |
| 1021 | Floating-point value. | 1017 | Floating-point value. |
| 1022 | |||
| 1023 | @item union Lisp_Misc | ||
| 1024 | Miscellaneous kinds of objects which don't fit into any of the above. | ||
| 1025 | @end table | 1018 | @end table |
| 1026 | 1019 | ||
| 1027 | These types are the first-class citizens of an internal type system. | 1020 | These types are the first-class citizens of an internal type system. |
| 1028 | Since the tag space is limited, all other types are the subtypes of either | 1021 | Since the tag space is limited, all other types are the subtypes of |
| 1029 | @code{Lisp_Vectorlike} or @code{Lisp_Misc}. Vector subtypes are enumerated | 1022 | @code{Lisp_Vectorlike}. Vector subtypes are enumerated |
| 1030 | by @code{enum pvec_type}, and nearly all complex objects like windows, buffers, | 1023 | by @code{enum pvec_type}, and nearly all complex objects like windows, buffers, |
| 1031 | frames, and processes fall into this category. The rest of special types, | 1024 | frames, and processes fall into this category. |
| 1032 | including markers and overlays, are enumerated by @code{enum Lisp_Misc_Type} | ||
| 1033 | and form the set of subtypes of @code{Lisp_Misc}. | ||
| 1034 | 1025 | ||
| 1035 | Below there is a description of a few subtypes of @code{Lisp_Vectorlike}. | 1026 | Below there is a description of a few subtypes of @code{Lisp_Vectorlike}. |
| 1036 | Buffer object represents the text to display and edit. Window is the part | 1027 | Buffer object represents the text to display and edit. Window is the part |
| @@ -831,9 +831,11 @@ is backwards-compatible with versions of Emacs in which the old function | |||
| 831 | exists. See the node "Displaying Buffers in Side Windows" in the ELisp | 831 | exists. See the node "Displaying Buffers in Side Windows" in the ELisp |
| 832 | manual for more details. | 832 | manual for more details. |
| 833 | 833 | ||
| 834 | ** The 'garbage-collect' function no longer returns a 'misc' component | 834 | ** garbage collection no longer treats miscellaneous objects specially; |
| 835 | because garbage collection no longer treats miscellaneous objects | 835 | they are now allocated like any other pseudovector. As a result, the |
| 836 | specially; they are now allocated like any other pseudovector. | 836 | 'garbage-collect' and 'memory-use-count' functions no longer return a |
| 837 | 'misc' component, and the 'misc-objects-consed' variable has been | ||
| 838 | removed. | ||
| 837 | 839 | ||
| 838 | 840 | ||
| 839 | * Lisp Changes in Emacs 27.1 | 841 | * Lisp Changes in Emacs 27.1 |
diff --git a/src/alloc.c b/src/alloc.c index fb8a8c98b08..6a938211599 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -379,7 +379,6 @@ enum mem_type | |||
| 379 | MEM_TYPE_BUFFER, | 379 | MEM_TYPE_BUFFER, |
| 380 | MEM_TYPE_CONS, | 380 | MEM_TYPE_CONS, |
| 381 | MEM_TYPE_STRING, | 381 | MEM_TYPE_STRING, |
| 382 | MEM_TYPE_MISC, | ||
| 383 | MEM_TYPE_SYMBOL, | 382 | MEM_TYPE_SYMBOL, |
| 384 | MEM_TYPE_FLOAT, | 383 | MEM_TYPE_FLOAT, |
| 385 | /* Since all non-bool pseudovectors are small enough to be | 384 | /* Since all non-bool pseudovectors are small enough to be |
| @@ -7023,11 +7022,10 @@ Each of these counters increments for a certain kind of object. | |||
| 7023 | The counters wrap around from the largest positive integer to zero. | 7022 | The counters wrap around from the largest positive integer to zero. |
| 7024 | Garbage collection does not decrease them. | 7023 | Garbage collection does not decrease them. |
| 7025 | The elements of the value are as follows: | 7024 | The elements of the value are as follows: |
| 7026 | (CONSES FLOATS VECTOR-CELLS SYMBOLS STRING-CHARS MISCS INTERVALS STRINGS) | 7025 | (CONSES FLOATS VECTOR-CELLS SYMBOLS STRING-CHARS INTERVALS STRINGS) |
| 7027 | All are in units of 1 = one object consed | 7026 | All are in units of 1 = one object consed |
| 7028 | except for VECTOR-CELLS and STRING-CHARS, which count the total length of | 7027 | except for VECTOR-CELLS and STRING-CHARS, which count the total length of |
| 7029 | objects consed. | 7028 | objects consed. |
| 7030 | MISCS include overlays, markers, and some internal types. | ||
| 7031 | Frames, windows, buffers, and subprocesses count as vectors | 7029 | Frames, windows, buffers, and subprocesses count as vectors |
| 7032 | (but the contents of a buffer's text do not count here). */) | 7030 | (but the contents of a buffer's text do not count here). */) |
| 7033 | (void) | 7031 | (void) |
| @@ -7038,7 +7036,6 @@ Frames, windows, buffers, and subprocesses count as vectors | |||
| 7038 | bounded_number (vector_cells_consed), | 7036 | bounded_number (vector_cells_consed), |
| 7039 | bounded_number (symbols_consed), | 7037 | bounded_number (symbols_consed), |
| 7040 | bounded_number (string_chars_consed), | 7038 | bounded_number (string_chars_consed), |
| 7041 | bounded_number (misc_objects_consed), | ||
| 7042 | bounded_number (intervals_consed), | 7039 | bounded_number (intervals_consed), |
| 7043 | bounded_number (strings_consed)); | 7040 | bounded_number (strings_consed)); |
| 7044 | } | 7041 | } |
| @@ -7297,11 +7294,6 @@ If this portion is smaller than `gc-cons-threshold', this is ignored. */); | |||
| 7297 | DEFVAR_INT ("string-chars-consed", string_chars_consed, | 7294 | DEFVAR_INT ("string-chars-consed", string_chars_consed, |
| 7298 | doc: /* Number of string characters that have been consed so far. */); | 7295 | doc: /* Number of string characters that have been consed so far. */); |
| 7299 | 7296 | ||
| 7300 | DEFVAR_INT ("misc-objects-consed", misc_objects_consed, | ||
| 7301 | doc: /* Number of miscellaneous objects that have been consed so far. | ||
| 7302 | These include markers and overlays, plus certain objects not visible | ||
| 7303 | to users. */); | ||
| 7304 | |||
| 7305 | DEFVAR_INT ("intervals-consed", intervals_consed, | 7297 | DEFVAR_INT ("intervals-consed", intervals_consed, |
| 7306 | doc: /* Number of intervals that have been consed so far. */); | 7298 | doc: /* Number of intervals that have been consed so far. */); |
| 7307 | 7299 | ||