[pulseaudio-commits] r2412 - /branches/glitch-free/src/pulsecore/memblock.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue May 13 17:40:37 PDT 2008


Author: lennart
Date: Wed May 14 02:40:36 2008
New Revision: 2412

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2412&root=pulseaudio&view=rev
Log:
if zero is passed to pa_memblock_new() allocate largest memory block possible from mempool

Modified:
    branches/glitch-free/src/pulsecore/memblock.c

Modified: branches/glitch-free/src/pulsecore/memblock.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/memblock.c?rev=2412&root=pulseaudio&r1=2411&r2=2412&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/memblock.c (original)
+++ branches/glitch-free/src/pulsecore/memblock.c Wed May 14 02:40:36 2008
@@ -204,7 +204,9 @@
     pa_memblock *b;
 
     pa_assert(p);
-    pa_assert(length > 0);
+
+    if (length <= 0)
+        length = pa_mempool_block_size_max(p);
 
     if (!(b = pa_memblock_new_pool(p, length)))
         b = memblock_new_appended(p, length);




More information about the pulseaudio-commits mailing list