summaryrefslogtreecommitdiff
path: root/utils/ypr0tools/files/common/etc
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2013-11-21 11:44:04 +0100
committerThomas Martitz <kugel@rockbox.org>2014-02-02 19:40:39 +0100
commitc46f9be10a9b3f34f804583d8cdc980ab62c58bd (patch)
tree73f425a50ece157d888e288881d45fe402f1faca /utils/ypr0tools/files/common/etc
parentdac40fdd60872da55b60ae9912b31e6549f1cf4a (diff)
downloadrockbox-c46f9be10a9b3f34f804583d8cdc980ab62c58bd.tar.gz
rockbox-c46f9be10a9b3f34f804583d8cdc980ab62c58bd.zip
talk: Smarter cache management for TALK_PARTIAL_LOAD.
Previously the clip cache of TALK_PARTIAL_LOAD reserved space N clips, each slot was as big as the maximum sized clip which was necessary to replace clips in-memory in MRU-style. The cache management now uses buflib to allocate and free each clip, using the clip's real size. This allows the clip cache to be much more compact, because no space is wasted for the max. sized clip. This makes use of buflib's ability to easily manage differently-sized memory chunks by moving them to make free space. As an example: for english.voice TALK_PARTIAL_LOAD allocated 288k in advance. for just 64 clips. With this patch ~70 clips can be stored in a 100k buffer. This, the memory usage is cut by 2/3 and almost optimal (there's still the buflib per-alloc cookie overhead). As a result the TALK_PARTIAL_LOAD buffer is restricted to 100k which still allows for more clips than previously, on average. Change-Id: I257654071e9a95770cd6db2c2765f020befce412
Diffstat (limited to 'utils/ypr0tools/files/common/etc')
0 files changed, 0 insertions, 0 deletions