[Fontconfig-bugs] [Bug 101889] Make fontconfig cache relocatable

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Aug 2 11:33:03 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=101889

--- Comment #9 from Behdad Esfahbod <freedesktop at behdad.org> ---
(In reply to Akira TAGOH from comment #8)
> No reference counts in the serialized FcPattern

Right. But we do increase ref count of the cache itself when you try reffing
the FcPattern.

> and can't figure out in it
> itself how long it is available, but FcCache. so when going to add something
> into the serialized FcPattern, it needs to be exposed to FcCache to manage
> the lifetime of the allocated memory. which is ugly. otherwise that may
> introduces the memory leaks or invalid access.

Sure. One way or another you need to do this...  When freeing the cache, walk
and "free" the patterns which will free the strings.

Another option is to keep the path relative, and resolve it in
FcFontRenderPrepare.

Maybe you should write to the list with your proposed design so we can all
discuss before implementing such drastic changes?  Basically what you have
committed right now is taking fontconfig cache from consuming no private memory
to consuming megabytes of private memory per app...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20170802/ee661771/attachment-0001.html>


More information about the Fontconfig-bugs mailing list