Wiki > Main > BuflibMemoryManagement (compare)
Difference: BuflibMemoryManagement (r5 vs. r4)
This project is part of the Google Summer of Code 2011 project.
Rockbox has no malloc() in the core. Therefore we have always worked with static buffers or buffers which cannot be freed, resized or allocated after audio playback started, leading to somewhat annoying "Please reboot to enable" messages. Since Rockbox runs on a wide range of players with vastly different properties, it has become increasingly difficult for us to chose the right size for buffers. malloc() is not an option for various reasons. One of the main reasons is memory fragmentation, since many targets have no MMU to resolve this problem. However, the plugin library has a promising allocator - buflib - hich is handle based and can free and compact, move or resize memory on demand. My project will integrate buflib into the core as the main allocator for dynamic memory allocation needs. This will get us rid of one of the biggest limitations we have to date, enabling us to implement more awesome features without sacrifying too much valuable memory and without the need to reboot to activate them. The key feature of buflib is indeed compaction. It means it can move allocations to fill holes caused by freeing memory, which solves the fragmentation issue.
Some of my code and progress can be found at http://github.com/kugel-/buflib (my out-of-tree buflib work) and http://repo.or.cz/w/kugel-rb.git (the gsoc2- prefixed branches) I will post to Flyspray once I consider something for SVN.
-- ThomasMartitz - 19 May 2011
r6 - 12 Aug 2011 - 13:18:17 - ThomasMartitzRevision r5 - 10 Jul 2011 - 00:04 - ThomasMartitz
Revision r4 - 28 Jun 2011 - 07:59 - ThomasMartitz
Copyright © by the contributing authors.