aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c18
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. */
131int ignore_warnings; 131int ignore_warnings;
132 132
133static void mark_object (), mark_buffer (); 133static void mark_object (), mark_buffer (), mark_perdisplays ();
134static void clear_marks (), gc_sweep (); 134static void clear_marks (), gc_sweep ();
135static void compact_strings (); 135static 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
1785static void
1786mark_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