mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
if zero is passed to pa_memblock_new() allocate largest memory block possible from mempool
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2412 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
f124445f89
commit
aae8beb8cc
1 changed files with 3 additions and 1 deletions
|
|
@ -204,7 +204,9 @@ pa_memblock *pa_memblock_new(pa_mempool *p, size_t length) {
|
||||||
pa_memblock *b;
|
pa_memblock *b;
|
||||||
|
|
||||||
pa_assert(p);
|
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)))
|
if (!(b = pa_memblock_new_pool(p, length)))
|
||||||
b = memblock_new_appended(p, length);
|
b = memblock_new_appended(p, length);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue