diff options
| author | Richard M. Stallman | 1997-08-13 04:13:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-13 04:13:39 +0000 |
| commit | fd27a53736853160650a0dcfcd9910d1baaa9daa (patch) | |
| tree | a734d6ab7dd23707f1e4d2c02aa9d45a54959b9a /src/alloc.c | |
| parent | b86e0aaf0fbed1cb4ebb10afba54b1965538b7c8 (diff) | |
| download | emacs-fd27a53736853160650a0dcfcd9910d1baaa9daa.tar.gz emacs-fd27a53736853160650a0dcfcd9910d1baaa9daa.zip | |
(free_marker): New function.
Diffstat (limited to 'src/alloc.c')
| -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 | |||
| 112 | int undo_limit; | 112 | int undo_limit; |
| 113 | int undo_strong_limit; | 113 | int undo_strong_limit; |
| 114 | 114 | ||
| 115 | int total_conses, total_markers, total_symbols, total_string_size, total_vector_size; | ||
| 116 | int total_free_conses, total_free_markers, total_free_symbols; | ||
| 117 | #ifdef LISP_FLOAT_TYPE | ||
| 118 | int total_free_floats, total_floats; | ||
| 119 | #endif /* LISP_FLOAT_TYPE */ | ||
| 120 | |||
| 115 | /* Points to memory space allocated as "spare", | 121 | /* Points to memory space allocated as "spare", |
| 116 | to be freed if we run out of memory. */ | 122 | to be freed if we run out of memory. */ |
| 117 | static char *spare_memory; | 123 | static char *spare_memory; |
| @@ -1032,6 +1038,18 @@ DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0, | |||
| 1032 | p->insertion_type = 0; | 1038 | p->insertion_type = 0; |
| 1033 | return val; | 1039 | return val; |
| 1034 | } | 1040 | } |
| 1041 | |||
| 1042 | /* Put MARKER back on the free list after using it temporarily. */ | ||
| 1043 | |||
| 1044 | free_marker (marker) | ||
| 1045 | Lisp_Object marker; | ||
| 1046 | { | ||
| 1047 | XMISC (marker)->u_marker.type = Lisp_Misc_Free; | ||
| 1048 | XMISC (marker)->u_free.chain = marker_free_list; | ||
| 1049 | marker_free_list = XMISC (marker); | ||
| 1050 | |||
| 1051 | total_free_markers++; | ||
| 1052 | } | ||
| 1035 | 1053 | ||
| 1036 | /* Allocation of strings */ | 1054 | /* Allocation of strings */ |
| 1037 | 1055 | ||
| @@ -1476,12 +1494,6 @@ struct backtrace | |||
| 1476 | 1494 | ||
| 1477 | /* Garbage collection! */ | 1495 | /* Garbage collection! */ |
| 1478 | 1496 | ||
| 1479 | int total_conses, total_markers, total_symbols, total_string_size, total_vector_size; | ||
| 1480 | int total_free_conses, total_free_markers, total_free_symbols; | ||
| 1481 | #ifdef LISP_FLOAT_TYPE | ||
| 1482 | int total_free_floats, total_floats; | ||
| 1483 | #endif /* LISP_FLOAT_TYPE */ | ||
| 1484 | |||
| 1485 | /* Temporarily prevent garbage collection. */ | 1497 | /* Temporarily prevent garbage collection. */ |
| 1486 | 1498 | ||
| 1487 | int | 1499 | int |