1
0
Fork 0
forked from len0rd/rockbox

GSoC/Buflib: Add buflib memory alocator to the core.

The buflib memory allocator is handle based and can free and
compact, move or resize memory on demand. This allows to effeciently
allocate memory dynamically without an MMU, by avoiding fragmentation
through memory compaction.

This patch adds the buflib library to the core, along with
convinience wrappers to omit the context parameter. Compaction is
not yet enabled, but will be in a later patch. Therefore, this acts as a
replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug
menu.

See buflib.h for some API documentation.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2011-08-30 14:01:33 +00:00
parent c940811ade
commit d0b72e2590
26 changed files with 1453 additions and 125 deletions

View file

@ -53,7 +53,7 @@
#include "language.h"
#include "wps.h"
#include "playlist.h"
#include "buffer.h"
#include "core_alloc.h"
#include "rolo.h"
#include "screens.h"
#include "usb_screen.h"
@ -337,7 +337,7 @@ static void init_tagcache(void)
static void init(void)
{
system_init();
buffer_init();
core_allocator_init();
kernel_init();
#ifdef APPLICATION
paths_init();
@ -400,9 +400,6 @@ static void init(void)
global_settings.mdb_shape,
global_settings.mdb_enable,
global_settings.superbass);
/* audio_init must to know the size of voice buffer so init voice first */
talk_init();
#endif /* CONFIG_CODEC != SWCODEC */
scrobbler_init();
@ -428,7 +425,7 @@ static void init(void)
#endif
system_init();
buffer_init();
core_allocator_init();
kernel_init();
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
@ -684,9 +681,6 @@ static void init(void)
global_settings.mdb_shape,
global_settings.mdb_enable,
global_settings.superbass);
/* audio_init must to know the size of voice buffer so init voice first */
talk_init();
#endif /* CONFIG_CODEC != SWCODEC */
CHART(">audio_init");