Mercurial > audlegacy
changeset 2290:9fc150e3542e trunk
[svn] - add memory_pool_add(): adds a pre-allocated element to a memory pool
author | nenolod |
---|---|
date | Sun, 07 Jan 2007 00:47:47 -0800 |
parents | dcac9f84176d |
children | 9841545632e9 |
files | ChangeLog audacious/memorypool.c audacious/memorypool.h |
diffstat | 3 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Jan 06 13:29:29 2007 -0800 +++ b/ChangeLog Sun Jan 07 00:47:47 2007 -0800 @@ -1,3 +1,10 @@ +2007-01-06 21:29:29 +0000 Giacomo Lozito <james@develia.org> + revision [3586] + - strenghtened penalty check in playback_initiate to handle some extreme situations (such as no output plugins loaded) + trunk/audacious/playback.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + + 2007-01-06 20:33:11 +0000 Giacomo Lozito <james@develia.org> revision [3584] - fix uninitialized integer, that was bringing troubles if the last playlist item was not available for playback
--- a/audacious/memorypool.c Sat Jan 06 13:29:29 2007 -0800 +++ b/audacious/memorypool.c Sun Jan 07 00:47:47 2007 -0800 @@ -54,6 +54,16 @@ } gpointer +memory_pool_add(MemoryPool * pool, gpointer ptr) +{ + g_mutex_lock(pool->mutex); + pool->stack = g_list_append(pool->stack, addr); + g_mutex_unlock(pool->mutex); + + return ptr; +} + +gpointer memory_pool_allocate(MemoryPool * pool, gsize sz) { gpointer addr;
--- a/audacious/memorypool.h Sat Jan 06 13:29:29 2007 -0800 +++ b/audacious/memorypool.h Sun Jan 07 00:47:47 2007 -0800 @@ -23,6 +23,7 @@ MemoryPool * memory_pool_new(void); MemoryPool * memory_pool_with_custom_destructor(GDestroyNotify notify); +gpointer memory_pool_add(MemoryPool * pool, gpointer ptr); gpointer memory_pool_allocate(MemoryPool * pool, gsize sz); void memory_pool_release(MemoryPool * pool, gpointer addr);