We are writing a font indexing script[1] for use with LaTeX and plain TeX (luaotfload package[2]), in order to gather all the info we need (mainly, names table and optical size) we are loading the fonts with the full blown fontloader.open(), now the problem is that memory consumption is steadily growing to the point that it can hang the whole system (I had to use a 2 GB swap instead of .5 GB + 1 GB memory to avoid system freeze) despite the fact that every open() call is followed by a close() call. It seems that fontloader.close() is not freeing the memory as it should (valgrind reports too many potential memory leaks). Any idea, is there a possibility for this to get improved? [1] http://github.com/mpg/luaotfload/blob/master/luaotfload-fonts.lua [2] http://github.com/mpg/luaotfload P.S. I tried to extend fontloader.info() to return the additional info we need and I managed to get the names and pfm tables and it was still as fast, but stopped at optical size info which for a reason beyond to me is implemented by OpenType specifications as a GPOS feature! and I couldn't get fontloader to parse GPOS table without parsing glyphs first. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
Khaled Hosny wrote:
It seems that fontloader.close() is not freeing the memory as it should (valgrind reports too many potential memory leaks). Any idea, is there a possibility for this to get improved?
I've created a tracker item for this. As you say there is a leak that valgrind sees, I am sure I will be able to remove (most) of it. Best wishes, Taco
participants (2)
-
Khaled Hosny
-
Taco Hoekwater