[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft]Some problem about FTC_Cache_RemoveFaceID
From: |
suzuki toshiya |
Subject: |
Re: [ft]Some problem about FTC_Cache_RemoveFaceID |
Date: |
Mon, 17 Jan 2011 23:29:13 +0900 |
User-agent: |
Mozilla-Thunderbird 2.0.0.12 (X11/20080406) |
Hi,
I will check, but please wait a few weeks. I'm quite sorry.
Regards,
mpsuzuki
于晨 wrote:
> Hello everyone,
> I found some strange thing when I used FTC_Cache_RemoveFaceID() to
> clear the cmap cache nodes, it seemed that there was a node can't be freed,
> as the code is:
>
> count = cache->p + cache->mask;
> for ( i = 0; i < count; i++ )
> {
> FTC_Node* bucket = cache->buckets + i;
> FTC_Node* pnode = bucket;
>
> ......
> }
>
> so I can only free the nodes linked from cache->buckets to
> cache->buckets+count-1, but maybe there is a node recorded in
> cache->buckets+count, as the code in ftc_cache_resize():
>
> cache->buckets[p + mask + 1] = new_list; //<---here: it may become
> the
> //
> cache->buckets+count
> cache->slack += FTC_HASH_MAX_LOAD;
> if ( p >= mask )
> {
> cache->mask = 2 * mask + 1;
> cache->p = 0;
> }
> else
> cache->p = p + 1;
>
> I noticed that in ftc_cache_resize() and FTC_Cache_Clear(), the "count" is
> calculated as " cache->p + cache->mask + 1", which can cover the range to the
> "cache->buckets+count".
>
> Does anyone know why FTC_Cache_RemoveFaceID uses cache->p + cache->mask to
> calculate the "count"?
>
> thanks.
>
> thealice
>
>
>
>
>
> _______________________________________________
> Freetype mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/freetype