diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-10-01 01:14:36 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-10-01 01:14:36 +0200 |
commit | 79ad4e63f691d1280dde2eb6521a1572c78d03ce (patch) | |
tree | 65670a8d2e354a4ac38644a7aef5cd194a43a8c3 /src/pulsecore/core.c | |
parent | a84b72bf96745702ba59c678a973edc7504ee50e (diff) |
Make the shared memory segment size configurable
This is useful only on systems where memory overcommit is not available
or disabled.
Diffstat (limited to 'src/pulsecore/core.c')
-rw-r--r-- | src/pulsecore/core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c index bd956ae0..5761bbc7 100644 --- a/src/pulsecore/core.c +++ b/src/pulsecore/core.c @@ -66,7 +66,7 @@ static int core_process_msg(pa_msgobject *o, int code, void *userdata, int64_t o static void core_free(pa_object *o); -pa_core* pa_core_new(pa_mainloop_api *m, int shared) { +pa_core* pa_core_new(pa_mainloop_api *m, pa_bool_t shared, size_t shm_size) { pa_core* c; pa_mempool *pool; int j; @@ -74,14 +74,14 @@ pa_core* pa_core_new(pa_mainloop_api *m, int shared) { pa_assert(m); if (shared) { - if (!(pool = pa_mempool_new(shared))) { + if (!(pool = pa_mempool_new(shared, shm_size))) { pa_log_warn("failed to allocate shared memory pool. Falling back to a normal memory pool."); - shared = 0; + shared = FALSE; } } if (!shared) { - if (!(pool = pa_mempool_new(shared))) { + if (!(pool = pa_mempool_new(shared, shm_size))) { pa_log("pa_mempool_new() failed."); return NULL; } |