projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b8fdc4
)
memblock: make it easy to disable mempool usage with $PULSE_MEMPOOL_DISABLE
author
Lennart Poettering
<lennart@poettering.net>
Wed, 16 Sep 2009 23:21:56 +0000
(
01:21
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 16 Sep 2009 23:21:56 +0000
(
01:21
+0200)
src/pulsecore/memblock.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/memblock.c
b/src/pulsecore/memblock.c
index
0e40d12
..
47f298a
100644
(file)
--- a/
src/pulsecore/memblock.c
+++ b/
src/pulsecore/memblock.c
@@
-303,10
+303,17
@@
static struct mempool_slot* mempool_slot_by_ptr(pa_mempool *p, void *ptr) {
pa_memblock *pa_memblock_new_pool(pa_mempool *p, size_t length) {
pa_memblock *b = NULL;
struct mempool_slot *slot;
+ static int mempool_disable = 0;
pa_assert(p);
pa_assert(length);
+ if (mempool_disable == 0)
+ mempool_disable = getenv("PULSE_MEMPOOL_DISABLE") ? 1 : -1;
+
+ if (mempool_disable > 0)
+ return NULL;
+
/* If -1 is passed as length we choose the size for the caller: we
* take the largest size that fits in one of our slots. */