summaryrefslogtreecommitdiff
path: root/apps/menus
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-08-30 14:01:33 +0000
committerThomas Martitz <kugel@rockbox.org>2011-08-30 14:01:33 +0000
commitd0b72e25903574acb1cf9184a6052cdd646dbc37 (patch)
tree5be8db5ee00b2a727e4821cf51a5f7bcf3991073 /apps/menus
parentc940811ade7d99a0e0d414df7c6509672413684a (diff)
downloadrockbox-d0b72e25903574acb1cf9184a6052cdd646dbc37.tar.gz
rockbox-d0b72e25903574acb1cf9184a6052cdd646dbc37.zip
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
Diffstat (limited to 'apps/menus')
-rw-r--r--apps/menus/main_menu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index c5758d1274..e88317aeab 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -182,7 +182,7 @@ static const char* info_getname(int selected_item, void *data,
182 182
183 case INFO_BUFFER: /* buffer */ 183 case INFO_BUFFER: /* buffer */
184 { 184 {
185 long kib = buffer_available() / 1024; /* to KiB */ 185 long kib = audio_buffer_available() / 1024; /* to KiB */
186 output_dyn_value(s1, sizeof(s1), kib, kbyte_units, true); 186 output_dyn_value(s1, sizeof(s1), kib, kbyte_units, true);
187 snprintf(buffer, buffer_len, "%s %s", str(LANG_BUFFER_STAT), s1); 187 snprintf(buffer, buffer_len, "%s %s", str(LANG_BUFFER_STAT), s1);
188 } 188 }
@@ -272,7 +272,7 @@ static int info_speak_item(int selected_item, void * data)
272 case INFO_BUFFER: /* buffer */ 272 case INFO_BUFFER: /* buffer */
273 { 273 {
274 talk_id(LANG_BUFFER_STAT, false); 274 talk_id(LANG_BUFFER_STAT, false);
275 long kib = buffer_available() / 1024; /* to KiB */ 275 long kib = audio_buffer_available() / 1024; /* to KiB */
276 output_dyn_value(NULL, 0, kib, kbyte_units, true); 276 output_dyn_value(NULL, 0, kib, kbyte_units, true);
277 break; 277 break;
278 } 278 }