[pulseaudio-discuss] [PATCH 2/2] memblock: use built-in function
Lu Guanqun
guanqun.lu at intel.com
Sun Aug 14 22:24:51 PDT 2011
Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
---
src/pulsecore/memblock.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c
index 332fcb7..409c65e 100644
--- a/src/pulsecore/memblock.c
+++ b/src/pulsecore/memblock.c
@@ -229,7 +229,7 @@ static pa_memblock *memblock_new_appended(pa_mempool *p, size_t length) {
/* If -1 is passed as length we choose the size for the caller. */
if (length == (size_t) -1)
- length = p->block_size - PA_ALIGN(sizeof(pa_memblock));
+ length = pa_mempool_block_size_max(p);
b = pa_xmalloc(PA_ALIGN(sizeof(pa_memblock)) + length);
PA_REFCNT_INIT(b);
More information about the pulseaudio-discuss
mailing list