[Webkit-unassigned] [Bug 70805] [EFL] Make cache flush when max size of cache has been changed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 31 01:32:20 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=70805


Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |rniwa at webkit.org
     Ever Confirmed|0                           |1




--- Comment #8 from Ryosuke Niwa <rniwa at webkit.org>  2011-10-31 01:32:20 PST ---
(In reply to comment #7)
> (In reply to comment #6)
> For example we have a cache that currently store 20MB of data
> * the tileUnusedCache->memory.used = 20MB
> and max value is set 40MB 
> tileUnusedCache->memory.max= 40MB
> 
> Now, a user calls:
> ewk_tile_unused_cache_max_set(tuc, 10MB)
> the cache after calling of this function should use only 10MB. Due to that 
> I call ewk_tile_unused_cache_auto_flush to release some memory.
> 
> The value of used and max will be:
> > ewk_tile_unused_cache_auto_flush has an early exit:
> if (tileUnusedCache->memory.used(20MB) <= tileUnusedCache->memory.max(10MB))
>     return;
> 
> the "if" condition is false in that situation, so the early exit it not occured in this case and the memory form cache will be released.

Makes sense. But I'd still prefer calling that variable oldMax than oldSize unless it's really the old size.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list