mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
GSoC/Buflib: Enable compaction in buflib.
This enables the ability to allocate (and free) memory dynamically without fragmentation, through compaction. This means allocations can move and fragmentation be reduced. Most changes are preparing Rockbox for this, which many times means adding a move callback which can temporarily disable movement when the corresponding code is in a critical section. For now, the audio buffer allocation has a central role, because it's the one having allocated most. This buffer is able to shrink itself, for which it needs to stop playback for a very short moment. For this, audio_buffer_available() returns the size of the audio buffer which can possibly be used by other allocations because the audio buffer can shrink. lastfm scrobbling and timestretch can now be toggled at runtime without requiring a reboot. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d0b72e2590
commit
baa070cca6
28 changed files with 865 additions and 298 deletions
|
@ -1876,7 +1876,7 @@ static bool is_videofile(const char* file)
|
|||
static bool get_videofile(int direction, char* videofile, size_t bufsize)
|
||||
{
|
||||
struct tree_context *tree = rb->tree_get_context();
|
||||
struct entry *dircache = tree->cache.entries;
|
||||
struct entry *dircache = rb->tree_get_entries(tree);
|
||||
int i, step, end, found = 0;
|
||||
char *videoname = rb->strrchr(videofile, '/') + 1;
|
||||
size_t rest = bufsize - (videoname - videofile) - 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue