diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-08-13 04:13:39 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-08-13 04:13:39 +0000 |
commit | 908e0bfcb049997a9de62591f611ebb37736e7c6 (patch) | |
tree | 50d1a97b2ca4bd08e8a91c0f1187af01b32b3f0e | |
parent | 9fc7b20242a925a0b6c6e286706fb2f9aa2a747c (diff) | |
download | emacs-908e0bfcb049997a9de62591f611ebb37736e7c6.tar.gz |
(free_marker): New function.
-rw-r--r-- | src/alloc.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/alloc.c b/src/alloc.c index b6480a63c81..b488a28309c 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -112,6 +112,12 @@ extern int undo_limit; int undo_strong_limit; +int total_conses, total_markers, total_symbols, total_string_size, total_vector_size; +int total_free_conses, total_free_markers, total_free_symbols; +#ifdef LISP_FLOAT_TYPE +int total_free_floats, total_floats; +#endif /* LISP_FLOAT_TYPE */ + /* Points to memory space allocated as "spare", to be freed if we run out of memory. */ static char *spare_memory; @@ -1032,6 +1038,18 @@ DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0, p->insertion_type = 0; return val; } + +/* Put MARKER back on the free list after using it temporarily. */ + +free_marker (marker) + Lisp_Object marker; +{ + XMISC (marker)->u_marker.type = Lisp_Misc_Free; + XMISC (marker)->u_free.chain = marker_free_list; + marker_free_list = XMISC (marker); + + total_free_markers++; +} /* Allocation of strings */ @@ -1476,12 +1494,6 @@ struct backtrace /* Garbage collection! */ -int total_conses, total_markers, total_symbols, total_string_size, total_vector_size; -int total_free_conses, total_free_markers, total_free_symbols; -#ifdef LISP_FLOAT_TYPE -int total_free_floats, total_floats; -#endif /* LISP_FLOAT_TYPE */ - /* Temporarily prevent garbage collection. */ int |