Dear Werner,

On Sun, 20 Feb 2011 16:16:44 +0100 (CET)
Werner LEMBERG <[email protected]> wrote:
>> 1) Attached is a patch to extend ftbench to take multiple
>> font pathnames from its argument, and execute benchmarks
>> for each faces.
>
>Both the patches to ftdump and ftbench look ok.

Thank you for comment and reviewing my messy patch.
However, the patch was written for a small testcase
to reproduce the memory leak by the bug that
<[email protected]> found, it is not needed
to fix the bug. The bug itself was fixed by 1-line
patch (it's already committed in GIT) in the end of
this message.

I think, I should write yet another demo program to
show the behaviour of the cache subsystem, for
freetype2-demos. freetype2-demos programs use the
cache subsystem, but all programs take only one font
file. Thus, it is not so easy to reproduce the cache
related bugs that happens under OOM conditions.
The patch was my first excersize for that, I should
write more cache-centric program...

Regards,
mpsuzuki

diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c
index 865fbb7..f01c403 100644
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -574,7 +574,7 @@
     FTC_Node     frees   = NULL;
 
 
-    count = cache->p + cache->mask;
+    count = cache->p + cache->mask + 1;
     for ( i = 0; i < count; i++ )
     {
       FTC_Node*  bucket = cache->buckets + i;


_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to