Subject: Re: bug#21556: 25.0.50; Memory leak in emacs -Q with lucid (font)

From: Dima Kogan <[email-masked]>
Date: Mon, 28 Sep 2015 02:22:50 -0700

Eli Zaretskii <[email-masked]> writes:

> So maybe we should simply remove (or ifdef away) the code that
> compacts the font caches.  If your assumption about reusing the font
> is anywhere near the truth, compacting the font cache gives us more
> trouble than it gains: we get slow redisplay in some cases and random
> hard-to-debug bugs, while the gains are only visible in very rare use
> cases such as the one described in the Oct 2013 discussion.

Hi. I put in some more probes, and it looks like the fonts aren't being
marked as used properly. I also wrote a bit of code to make the gc
actually free fonts it drops. Unsurprisingly, this causes things to
crash, since it then frees fonts that are actually in use. Does it make
sense to track down why the fonts aren't marked as used? If the
compaction code goes away, then it doesn't really matter.