diff options
| author | Karl Heuer | 1995-02-03 23:23:34 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-02-03 23:23:34 +0000 |
| commit | 084b1a0c7d989e97cdd1c600bec761cb1f2e7119 (patch) | |
| tree | 0a53a6da882cadec07f6388a04eff5ac14a6be2a /src/alloc.c | |
| parent | a2d3b8ba7cfee3837bb2ed0413634117f6ddeba9 (diff) | |
| download | emacs-084b1a0c7d989e97cdd1c600bec761cb1f2e7119.tar.gz emacs-084b1a0c7d989e97cdd1c600bec761cb1f2e7119.zip | |
(mark_perdisplays): New function.
(Fgarbage_collect): Call it.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c index 1ed27b168f5..f36bf7e3e1e 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -130,7 +130,7 @@ int stack_copy_size; | |||
| 130 | /* Non-zero means ignore malloc warnings. Set during initialization. */ | 130 | /* Non-zero means ignore malloc warnings. Set during initialization. */ |
| 131 | int ignore_warnings; | 131 | int ignore_warnings; |
| 132 | 132 | ||
| 133 | static void mark_object (), mark_buffer (); | 133 | static void mark_object (), mark_buffer (), mark_perdisplays (); |
| 134 | static void clear_marks (), gc_sweep (); | 134 | static void clear_marks (), gc_sweep (); |
| 135 | static void compact_strings (); | 135 | static void compact_strings (); |
| 136 | 136 | ||
| @@ -1358,6 +1358,7 @@ Garbage collection happens automatically if you cons more than\n\ | |||
| 1358 | XMARK (backlist->args[i]); | 1358 | XMARK (backlist->args[i]); |
| 1359 | } | 1359 | } |
| 1360 | } | 1360 | } |
| 1361 | mark_perdisplays (); | ||
| 1361 | 1362 | ||
| 1362 | gc_sweep (); | 1363 | gc_sweep (); |
| 1363 | 1364 | ||
| @@ -1777,6 +1778,21 @@ mark_buffer (buf) | |||
| 1777 | mark_buffer (base_buffer); | 1778 | mark_buffer (base_buffer); |
| 1778 | } | 1779 | } |
| 1779 | } | 1780 | } |
| 1781 | |||
| 1782 | |||
| 1783 | /* Mark the pointers in the perdisplay objects. */ | ||
| 1784 | |||
| 1785 | static void | ||
| 1786 | mark_perdisplays () | ||
| 1787 | { | ||
| 1788 | PERDISPLAY *perd; | ||
| 1789 | for (perd = all_perdisplays; perd; perd = perd->next_perdisplay) | ||
| 1790 | { | ||
| 1791 | mark_object (&perd->Vprefix_arg); | ||
| 1792 | mark_object (&perd->Vcurrent_prefix_arg); | ||
| 1793 | mark_object (&perd->kbd_buffer_frame_or_window); | ||
| 1794 | } | ||
| 1795 | } | ||
| 1780 | 1796 | ||
| 1781 | /* Sweep: find all structures not marked, and free them. */ | 1797 | /* Sweep: find all structures not marked, and free them. */ |
| 1782 | 1798 | ||