aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorMiles Bader2001-10-17 03:16:12 +0000
committerMiles Bader2001-10-17 03:16:12 +0000
commit7ee72033eb52c5891e39c80b6db21e491ce0b187 (patch)
tree5d7f0e7a7efbf8ada6531247701ba53d6c70579d /src/alloc.c
parent015a8883e056cd23d926a45304b63880b7a99063 (diff)
downloademacs-7ee72033eb52c5891e39c80b6db21e491ce0b187.tar.gz
emacs-7ee72033eb52c5891e39c80b6db21e491ce0b187.zip
Change doc-string comments to `new style' [w/`doc:' keyword].
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c151
1 files changed, 75 insertions, 76 deletions
diff --git a/src/alloc.c b/src/alloc.c
index a7780e9ad91..101f599d009 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -38,7 +38,6 @@ Boston, MA 02111-1307, USA. */
38 replaced, this file likely will not be used. */ 38 replaced, this file likely will not be used. */
39 39
40#undef HIDE_LISP_IMPLEMENTATION 40#undef HIDE_LISP_IMPLEMENTATION
41#define DOC_STRINGS_IN_COMMENTS
42#include "lisp.h" 41#include "lisp.h"
43#include "process.h" 42#include "process.h"
44#include "intervals.h" 43#include "intervals.h"
@@ -1660,9 +1659,9 @@ compact_small_strings ()
1660 1659
1661 1660
1662DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0, 1661DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0,
1663 /* Return a newly created string of length LENGTH, with each element being INIT. 1662 doc: /* Return a newly created string of length LENGTH, with each element being INIT.
1664Both LENGTH and INIT must be numbers. */ 1663Both LENGTH and INIT must be numbers. */)
1665 (length, init)) 1664 (length, init)
1666 Lisp_Object length, init; 1665 Lisp_Object length, init;
1667{ 1666{
1668 register Lisp_Object val; 1667 register Lisp_Object val;
@@ -1704,9 +1703,9 @@ Both LENGTH and INIT must be numbers. */
1704 1703
1705 1704
1706DEFUN ("make-bool-vector", Fmake_bool_vector, Smake_bool_vector, 2, 2, 0, 1705DEFUN ("make-bool-vector", Fmake_bool_vector, Smake_bool_vector, 2, 2, 0,
1707 /* Return a new bool-vector of length LENGTH, using INIT for as each element. 1706 doc: /* Return a new bool-vector of length LENGTH, using INIT for as each element.
1708LENGTH must be a number. INIT matters only in whether it is t or nil. */ 1707LENGTH must be a number. INIT matters only in whether it is t or nil. */)
1709 (length, init)) 1708 (length, init)
1710 Lisp_Object length, init; 1709 Lisp_Object length, init;
1711{ 1710{
1712 register Lisp_Object val; 1711 register Lisp_Object val;
@@ -2058,8 +2057,8 @@ free_cons (ptr)
2058 2057
2059 2058
2060DEFUN ("cons", Fcons, Scons, 2, 2, 0, 2059DEFUN ("cons", Fcons, Scons, 2, 2, 0,
2061 /* Create a new cons, give it CAR and CDR as components, and return it. */ 2060 doc: /* Create a new cons, give it CAR and CDR as components, and return it. */)
2062 (car, cdr)) 2061 (car, cdr)
2063 Lisp_Object car, cdr; 2062 Lisp_Object car, cdr;
2064{ 2063{
2065 register Lisp_Object val; 2064 register Lisp_Object val;
@@ -2131,9 +2130,9 @@ list5 (arg1, arg2, arg3, arg4, arg5)
2131 2130
2132 2131
2133DEFUN ("list", Flist, Slist, 0, MANY, 0, 2132DEFUN ("list", Flist, Slist, 0, MANY, 0,
2134 /* Return a newly created list with specified arguments as elements. 2133 doc: /* Return a newly created list with specified arguments as elements.
2135Any number of arguments, even zero arguments, are allowed. */ 2134Any number of arguments, even zero arguments, are allowed. */)
2136 (nargs, args)) 2135 (nargs, args)
2137 int nargs; 2136 int nargs;
2138 register Lisp_Object *args; 2137 register Lisp_Object *args;
2139{ 2138{
@@ -2150,8 +2149,8 @@ Any number of arguments, even zero arguments, are allowed. */
2150 2149
2151 2150
2152DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0, 2151DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0,
2153 /* Return a newly created list of length LENGTH, with each element being INIT. */ 2152 doc: /* Return a newly created list of length LENGTH, with each element being INIT. */)
2154 (length, init)) 2153 (length, init)
2155 register Lisp_Object length, init; 2154 register Lisp_Object length, init;
2156{ 2155{
2157 register Lisp_Object val; 2156 register Lisp_Object val;
@@ -2337,9 +2336,9 @@ allocate_other_vector (len)
2337 2336
2338 2337
2339DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0, 2338DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0,
2340 /* Return a newly created vector of length LENGTH, with each element being INIT. 2339 doc: /* Return a newly created vector of length LENGTH, with each element being INIT.
2341See also the function `vector'. */ 2340See also the function `vector'. */)
2342 (length, init)) 2341 (length, init)
2343 register Lisp_Object length, init; 2342 register Lisp_Object length, init;
2344{ 2343{
2345 Lisp_Object vector; 2344 Lisp_Object vector;
@@ -2360,11 +2359,11 @@ See also the function `vector'. */
2360 2359
2361 2360
2362DEFUN ("make-char-table", Fmake_char_table, Smake_char_table, 1, 2, 0, 2361DEFUN ("make-char-table", Fmake_char_table, Smake_char_table, 1, 2, 0,
2363 /* Return a newly created char-table, with purpose PURPOSE. 2362 doc: /* Return a newly created char-table, with purpose PURPOSE.
2364Each element is initialized to INIT, which defaults to nil. 2363Each element is initialized to INIT, which defaults to nil.
2365PURPOSE should be a symbol which has a `char-table-extra-slots' property. 2364PURPOSE should be a symbol which has a `char-table-extra-slots' property.
2366The property's value should be an integer between 0 and 10. */ 2365The property's value should be an integer between 0 and 10. */)
2367 (purpose, init)) 2366 (purpose, init)
2368 register Lisp_Object purpose, init; 2367 register Lisp_Object purpose, init;
2369{ 2368{
2370 Lisp_Object vector; 2369 Lisp_Object vector;
@@ -2403,9 +2402,9 @@ make_sub_char_table (defalt)
2403 2402
2404 2403
2405DEFUN ("vector", Fvector, Svector, 0, MANY, 0, 2404DEFUN ("vector", Fvector, Svector, 0, MANY, 0,
2406 /* Return a newly created vector with specified arguments as elements. 2405 doc: /* Return a newly created vector with specified arguments as elements.
2407Any number of arguments, even zero arguments, are allowed. */ 2406Any number of arguments, even zero arguments, are allowed. */)
2408 (nargs, args)) 2407 (nargs, args)
2409 register int nargs; 2408 register int nargs;
2410 Lisp_Object *args; 2409 Lisp_Object *args;
2411{ 2410{
@@ -2423,12 +2422,12 @@ Any number of arguments, even zero arguments, are allowed. */
2423 2422
2424 2423
2425DEFUN ("make-byte-code", Fmake_byte_code, Smake_byte_code, 4, MANY, 0, 2424DEFUN ("make-byte-code", Fmake_byte_code, Smake_byte_code, 4, MANY, 0,
2426 /* Create a byte-code object with specified arguments as elements. 2425 doc: /* Create a byte-code object with specified arguments as elements.
2427The arguments should be the arglist, bytecode-string, constant vector, 2426The arguments should be the arglist, bytecode-string, constant vector,
2428stack size, (optional) doc string, and (optional) interactive spec. 2427stack size, (optional) doc string, and (optional) interactive spec.
2429The first four arguments are required; at most six have any 2428The first four arguments are required; at most six have any
2430significance. */ 2429significance. */)
2431 (nargs, args)) 2430 (nargs, args)
2432 register int nargs; 2431 register int nargs;
2433 Lisp_Object *args; 2432 Lisp_Object *args;
2434{ 2433{
@@ -2511,9 +2510,9 @@ init_symbol ()
2511 2510
2512 2511
2513DEFUN ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0, 2512DEFUN ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0,
2514 /* Return a newly allocated uninterned symbol whose name is NAME. 2513 doc: /* Return a newly allocated uninterned symbol whose name is NAME.
2515Its value and function definition are void, and its property list is nil. */ 2514Its value and function definition are void, and its property list is nil. */)
2516 (name)) 2515 (name)
2517 Lisp_Object name; 2516 Lisp_Object name;
2518{ 2517{
2519 register Lisp_Object val; 2518 register Lisp_Object val;
@@ -2629,8 +2628,8 @@ allocate_misc ()
2629} 2628}
2630 2629
2631DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0, 2630DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0,
2632 /* Return a newly allocated marker which does not point at any place. */ 2631 doc: /* Return a newly allocated marker which does not point at any place. */)
2633 ()) 2632 ()
2634{ 2633{
2635 register Lisp_Object val; 2634 register Lisp_Object val;
2636 register struct Lisp_Marker *p; 2635 register struct Lisp_Marker *p;
@@ -3300,8 +3299,8 @@ static int max_live, max_zombies;
3300static double avg_live; 3299static double avg_live;
3301 3300
3302DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "", 3301DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "",
3303 /* Show information about live and zombie objects. */ 3302 doc: /* Show information about live and zombie objects. */)
3304 ()) 3303 ()
3305{ 3304{
3306 Lisp_Object args[7]; 3305 Lisp_Object args[7];
3307 args[0] = build_string ("%d GCs, avg live/zombies = %.2f/%.2f (%f%%), max %d/%d"); 3306 args[0] = build_string ("%d GCs, avg live/zombies = %.2f/%.2f (%f%%), max %d/%d");
@@ -3540,7 +3539,7 @@ mark_memory (start, end)
3540 only a pointer to them remains. Example: 3539 only a pointer to them remains. Example:
3541 3540
3542 DEFUN ("testme", Ftestme, Stestme, 0, 0, 0, "") 3541 DEFUN ("testme", Ftestme, Stestme, 0, 0, 0, "")
3543 () 3542 ()
3544 { 3543 {
3545 Lisp_Object obj = build_string ("test"); 3544 Lisp_Object obj = build_string ("test");
3546 struct Lisp_String *s = XSTRING (obj); 3545 struct Lisp_String *s = XSTRING (obj);
@@ -3919,10 +3918,10 @@ make_pure_vector (len)
3919 3918
3920 3919
3921DEFUN ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0, 3920DEFUN ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0,
3922 /* Make a copy of OBJECT in pure storage. 3921 doc: /* Make a copy of OBJECT in pure storage.
3923Recursively copies contents of vectors and cons cells. 3922Recursively copies contents of vectors and cons cells.
3924Does not copy symbols. Copies strings without text properties. */ 3923Does not copy symbols. Copies strings without text properties. */)
3925 (obj)) 3924 (obj)
3926 register Lisp_Object obj; 3925 register Lisp_Object obj;
3927{ 3926{
3928 if (NILP (Vpurify_flag)) 3927 if (NILP (Vpurify_flag))
@@ -4016,15 +4015,15 @@ inhibit_garbage_collection ()
4016 4015
4017 4016
4018DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", 4017DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "",
4019 /* Reclaim storage for Lisp objects no longer needed. 4018 doc: /* Reclaim storage for Lisp objects no longer needed.
4020Returns info on amount of space in use: 4019Returns info on amount of space in use:
4021 ((USED-CONSES . FREE-CONSES) (USED-SYMS . FREE-SYMS) 4020 ((USED-CONSES . FREE-CONSES) (USED-SYMS . FREE-SYMS)
4022 (USED-MARKERS . FREE-MARKERS) USED-STRING-CHARS USED-VECTOR-SLOTS 4021 (USED-MARKERS . FREE-MARKERS) USED-STRING-CHARS USED-VECTOR-SLOTS
4023 (USED-FLOATS . FREE-FLOATS) (USED-INTERVALS . FREE-INTERVALS) 4022 (USED-FLOATS . FREE-FLOATS) (USED-INTERVALS . FREE-INTERVALS)
4024 (USED-STRINGS . FREE-STRINGS)) 4023 (USED-STRINGS . FREE-STRINGS))
4025Garbage collection happens automatically if you cons more than 4024Garbage collection happens automatically if you cons more than
4026`gc-cons-threshold' bytes of Lisp data since previous garbage collection. */ 4025`gc-cons-threshold' bytes of Lisp data since previous garbage collection. */)
4027 ()) 4026 ()
4028{ 4027{
4029 register struct gcpro *tail; 4028 register struct gcpro *tail;
4030 register struct specbinding *bind; 4029 register struct specbinding *bind;
@@ -5321,10 +5320,10 @@ gc_sweep ()
5321/* Debugging aids. */ 5320/* Debugging aids. */
5322 5321
5323DEFUN ("memory-limit", Fmemory_limit, Smemory_limit, 0, 0, 0, 5322DEFUN ("memory-limit", Fmemory_limit, Smemory_limit, 0, 0, 0,
5324 /* Return the address of the last byte Emacs has allocated, divided by 1024. 5323 doc: /* Return the address of the last byte Emacs has allocated, divided by 1024.
5325This may be helpful in debugging Emacs's memory usage. 5324This may be helpful in debugging Emacs's memory usage.
5326We divide the value by 1024 to make sure it fits in a Lisp integer. */ 5325We divide the value by 1024 to make sure it fits in a Lisp integer. */)
5327 ()) 5326 ()
5328{ 5327{
5329 Lisp_Object end; 5328 Lisp_Object end;
5330 5329
@@ -5334,7 +5333,7 @@ We divide the value by 1024 to make sure it fits in a Lisp integer. */
5334} 5333}
5335 5334
5336DEFUN ("memory-use-counts", Fmemory_use_counts, Smemory_use_counts, 0, 0, 0, 5335DEFUN ("memory-use-counts", Fmemory_use_counts, Smemory_use_counts, 0, 0, 0,
5337 /* Return a list of counters that measure how much consing there has been. 5336 doc: /* Return a list of counters that measure how much consing there has been.
5338Each of these counters increments for a certain kind of object. 5337Each of these counters increments for a certain kind of object.
5339The counters wrap around from the largest positive integer to zero. 5338The counters wrap around from the largest positive integer to zero.
5340Garbage collection does not decrease them. 5339Garbage collection does not decrease them.
@@ -5345,8 +5344,8 @@ except for VECTOR-CELLS and STRING-CHARS, which count the total length of
5345objects consed. 5344objects consed.
5346MISCS include overlays, markers, and some internal types. 5345MISCS include overlays, markers, and some internal types.
5347Frames, windows, buffers, and subprocesses count as vectors 5346Frames, windows, buffers, and subprocesses count as vectors
5348 (but the contents of a buffer's text do not count here). */ 5347 (but the contents of a buffer's text do not count here). */)
5349 ()) 5348 ()
5350{ 5349{
5351 Lisp_Object consed[8]; 5350 Lisp_Object consed[8];
5352 5351
@@ -5439,8 +5438,8 @@ init_alloc ()
5439void 5438void
5440syms_of_alloc () 5439syms_of_alloc ()
5441{ 5440{
5442 DEFVAR_INT ("gc-cons-threshold", &gc_cons_threshold 5441 DEFVAR_INT ("gc-cons-threshold", &gc_cons_threshold,
5443 /* *Number of bytes of consing between garbage collections. 5442 doc: /* *Number of bytes of consing between garbage collections.
5444Garbage collection can happen automatically once this many bytes have been 5443Garbage collection can happen automatically once this many bytes have been
5445allocated since the last garbage collection. All data types count. 5444allocated since the last garbage collection. All data types count.
5446 5445
@@ -5449,58 +5448,58 @@ Garbage collection happens automatically only when `eval' is called.
5449By binding this temporarily to a large number, you can effectively 5448By binding this temporarily to a large number, you can effectively
5450prevent garbage collection during a part of the program. */); 5449prevent garbage collection during a part of the program. */);
5451 5450
5452 DEFVAR_INT ("pure-bytes-used", &pure_bytes_used 5451 DEFVAR_INT ("pure-bytes-used", &pure_bytes_used,
5453 /* Number of bytes of sharable Lisp data allocated so far. */); 5452 doc: /* Number of bytes of sharable Lisp data allocated so far. */);
5454 5453
5455 DEFVAR_INT ("cons-cells-consed", &cons_cells_consed 5454 DEFVAR_INT ("cons-cells-consed", &cons_cells_consed,
5456 /* Number of cons cells that have been consed so far. */); 5455 doc: /* Number of cons cells that have been consed so far. */);
5457 5456
5458 DEFVAR_INT ("floats-consed", &floats_consed 5457 DEFVAR_INT ("floats-consed", &floats_consed,
5459 /* Number of floats that have been consed so far. */); 5458 doc: /* Number of floats that have been consed so far. */);
5460 5459
5461 DEFVAR_INT ("vector-cells-consed", &vector_cells_consed 5460 DEFVAR_INT ("vector-cells-consed", &vector_cells_consed,
5462 /* Number of vector cells that have been consed so far. */); 5461 doc: /* Number of vector cells that have been consed so far. */);
5463 5462
5464 DEFVAR_INT ("symbols-consed", &symbols_consed 5463 DEFVAR_INT ("symbols-consed", &symbols_consed,
5465 /* Number of symbols that have been consed so far. */); 5464 doc: /* Number of symbols that have been consed so far. */);
5466 5465
5467 DEFVAR_INT ("string-chars-consed", &string_chars_consed 5466 DEFVAR_INT ("string-chars-consed", &string_chars_consed,
5468 /* Number of string characters that have been consed so far. */); 5467 doc: /* Number of string characters that have been consed so far. */);
5469 5468
5470 DEFVAR_INT ("misc-objects-consed", &misc_objects_consed 5469 DEFVAR_INT ("misc-objects-consed", &misc_objects_consed,
5471 /* Number of miscellaneous objects that have been consed so far. */); 5470 doc: /* Number of miscellaneous objects that have been consed so far. */);
5472 5471
5473 DEFVAR_INT ("intervals-consed", &intervals_consed 5472 DEFVAR_INT ("intervals-consed", &intervals_consed,
5474 /* Number of intervals that have been consed so far. */); 5473 doc: /* Number of intervals that have been consed so far. */);
5475 5474
5476 DEFVAR_INT ("strings-consed", &strings_consed 5475 DEFVAR_INT ("strings-consed", &strings_consed,
5477 /* Number of strings that have been consed so far. */); 5476 doc: /* Number of strings that have been consed so far. */);
5478 5477
5479 DEFVAR_LISP ("purify-flag", &Vpurify_flag 5478 DEFVAR_LISP ("purify-flag", &Vpurify_flag,
5480 /* Non-nil means loading Lisp code in order to dump an executable. 5479 doc: /* Non-nil means loading Lisp code in order to dump an executable.
5481This means that certain objects should be allocated in shared (pure) space. */); 5480This means that certain objects should be allocated in shared (pure) space. */);
5482 5481
5483 DEFVAR_INT ("undo-limit", &undo_limit 5482 DEFVAR_INT ("undo-limit", &undo_limit,
5484 /* Keep no more undo information once it exceeds this size. 5483 doc: /* Keep no more undo information once it exceeds this size.
5485This limit is applied when garbage collection happens. 5484This limit is applied when garbage collection happens.
5486The size is counted as the number of bytes occupied, 5485The size is counted as the number of bytes occupied,
5487which includes both saved text and other data. */); 5486which includes both saved text and other data. */);
5488 undo_limit = 20000; 5487 undo_limit = 20000;
5489 5488
5490 DEFVAR_INT ("undo-strong-limit", &undo_strong_limit 5489 DEFVAR_INT ("undo-strong-limit", &undo_strong_limit,
5491 /* Don't keep more than this much size of undo information. 5490 doc: /* Don't keep more than this much size of undo information.
5492A command which pushes past this size is itself forgotten. 5491A command which pushes past this size is itself forgotten.
5493This limit is applied when garbage collection happens. 5492This limit is applied when garbage collection happens.
5494The size is counted as the number of bytes occupied, 5493The size is counted as the number of bytes occupied,
5495which includes both saved text and other data. */); 5494which includes both saved text and other data. */);
5496 undo_strong_limit = 30000; 5495 undo_strong_limit = 30000;
5497 5496
5498 DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages 5497 DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages,
5499 /* Non-nil means display messages at start and end of garbage collection. */); 5498 doc: /* Non-nil means display messages at start and end of garbage collection. */);
5500 garbage_collection_messages = 0; 5499 garbage_collection_messages = 0;
5501 5500
5502 DEFVAR_LISP ("post-gc-hook", &Vpost_gc_hook 5501 DEFVAR_LISP ("post-gc-hook", &Vpost_gc_hook,
5503 /* Hook run after garbage collection has finished. */); 5502 doc: /* Hook run after garbage collection has finished. */);
5504 Vpost_gc_hook = Qnil; 5503 Vpost_gc_hook = Qnil;
5505 Qpost_gc_hook = intern ("post-gc-hook"); 5504 Qpost_gc_hook = intern ("post-gc-hook");
5506 staticpro (&Qpost_gc_hook); 5505 staticpro (&Qpost_gc_hook);