aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index aeda42637cd..447b465a076 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2877,7 +2877,11 @@ cleanup_vector (struct Lisp_Vector *vector)
2877 if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_FONT) 2877 if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_FONT)
2878 && ((vector->header.size & PSEUDOVECTOR_SIZE_MASK) 2878 && ((vector->header.size & PSEUDOVECTOR_SIZE_MASK)
2879 == FONT_OBJECT_MAX)) 2879 == FONT_OBJECT_MAX))
2880 ((struct font *) vector)->driver->close ((struct font *) vector); 2880 {
2881 /* Attempt to catch subtle bugs like Bug#16140. */
2882 eassert (valid_font_driver (((struct font *) vector)->driver));
2883 ((struct font *) vector)->driver->close ((struct font *) vector);
2884 }
2881} 2885}
2882 2886
2883/* Reclaim space used by unmarked vectors. */ 2887/* Reclaim space used by unmarked vectors. */
@@ -5299,6 +5303,10 @@ total_bytes_of_live_objects (void)
5299 5303
5300#ifdef HAVE_WINDOW_SYSTEM 5304#ifdef HAVE_WINDOW_SYSTEM
5301 5305
5306/* This code has a few issues on MS-Windows, see Bug#15876 and Bug#16140. */
5307
5308#if !defined (HAVE_NTGUI)
5309
5302/* Remove unmarked font-spec and font-entity objects from ENTRY, which is 5310/* Remove unmarked font-spec and font-entity objects from ENTRY, which is
5303 (DRIVER-TYPE NUM-FRAMES FONT-CACHE-DATA ...), and return changed entry. */ 5311 (DRIVER-TYPE NUM-FRAMES FONT-CACHE-DATA ...), and return changed entry. */
5304 5312
@@ -5337,6 +5345,8 @@ compact_font_cache_entry (Lisp_Object entry)
5337 return entry; 5345 return entry;
5338} 5346}
5339 5347
5348#endif /* not HAVE_NTGUI */
5349
5340/* Compact font caches on all terminals and mark 5350/* Compact font caches on all terminals and mark
5341 everything which is still here after compaction. */ 5351 everything which is still here after compaction. */
5342 5352
@@ -5348,7 +5358,7 @@ compact_font_caches (void)
5348 for (t = terminal_list; t; t = t->next_terminal) 5358 for (t = terminal_list; t; t = t->next_terminal)
5349 { 5359 {
5350 Lisp_Object cache = TERMINAL_FONT_CACHE (t); 5360 Lisp_Object cache = TERMINAL_FONT_CACHE (t);
5351 5361#if !defined (HAVE_NTGUI)
5352 if (CONSP (cache)) 5362 if (CONSP (cache))
5353 { 5363 {
5354 Lisp_Object entry; 5364 Lisp_Object entry;
@@ -5356,6 +5366,7 @@ compact_font_caches (void)
5356 for (entry = XCDR (cache); CONSP (entry); entry = XCDR (entry)) 5366 for (entry = XCDR (cache); CONSP (entry); entry = XCDR (entry))
5357 XSETCAR (entry, compact_font_cache_entry (XCAR (entry))); 5367 XSETCAR (entry, compact_font_cache_entry (XCAR (entry)));
5358 } 5368 }
5369#endif /* not HAVE_NTGUI */
5359 mark_object (cache); 5370 mark_object (cache);
5360 } 5371 }
5361} 5372}