diff options
author | Thomas Martitz <kugel@rockbox.org> | 2011-08-30 14:01:33 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2011-08-30 14:01:33 +0000 |
commit | d0b72e25903574acb1cf9184a6052cdd646dbc37 (patch) | |
tree | 5be8db5ee00b2a727e4821cf51a5f7bcf3991073 /apps/playlist.h | |
parent | c940811ade7d99a0e0d414df7c6509672413684a (diff) |
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/playlist.h')
-rw-r--r-- | apps/playlist.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/playlist.h b/apps/playlist.h index d994f6e800..f14b5c6460 100644 --- a/apps/playlist.h +++ b/apps/playlist.h @@ -85,7 +85,11 @@ struct playlist_info int max_playlist_size; /* Max number of files in playlist. Mirror of global_settings.max_files_in_playlist */ bool in_ram; /* playlist stored in ram (dirplay) */ - char *buffer; /* buffer for in-ram playlists */ + + union { + char *buffer; /* buffer for in-ram playlists */ + int *seek_buf; /* buffer for seeks in real playlists */ + }; int buffer_size; /* size of buffer */ int buffer_end_pos; /* last position where buffer was written */ int index; /* index of current playing track */ |