core: Add a second rw mempool

To keep the data and the ringbuffer separate, let's add another
mempool just for the ringbuffer(s). That way, the client can open
the ringbuffer shm file in rw mode and keep the data in ro mode.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
David Henningsson 2014-04-25 14:20:57 +02:00
parent 073128fbc8
commit b06e616525
2 changed files with 16 additions and 3 deletions

View file

@ -170,7 +170,10 @@ struct pa_core {
PA_LLIST_HEAD(pa_subscription_event, subscription_event_queue);
pa_subscription_event *subscription_event_last;
pa_mempool *mempool;
/* The mempool is used for data we write to, it's readonly for the client.
The rw_mempool is used for data writable by both server and client (and
can be NULL in some cases). */
pa_mempool *mempool, *rw_mempool;
pa_silence_cache silence_cache;
pa_time_event *exit_event;