diff options
author | Ahmed S. Darwish <darwish.07@gmail.com> | 2016-03-13 01:09:39 +0200 |
---|---|---|
committer | David Henningsson <david.henningsson@canonical.com> | 2016-04-02 05:53:33 +0200 |
commit | ee2db622778ae8038c9e178675978ad23f1300a2 (patch) | |
tree | f83eb13bf2360dd69e903d256b715daf7652271f /src/tests/srbchannel-test.c | |
parent | f8714af56bfcfeccd15a091c47492d3dc3008f61 (diff) | |
download | pulseaudio-ee2db622778ae8038c9e178675978ad23f1300a2.tar.gz |
pulsecore: Specially mark global mempools
Color global mempools with a special mark. This special marking
is needed for handling memfd-backed pools.
To avoid fd leaks, memfd pools are registered with the connection
pstream to create an ID<->memfd mapping on both PA endpoints.
Such memory regions are then always referenced by their IDs and
never by their fds, and so their fds can be safely closed later.
Unfortunately this scheme cannot work with global pools since the
registration ID<->memfd mechanism needs to happen for each newly
connected client, and thus the need for a more special handling.
That is, for the pool's fd to be always open :-(
Almost all mempools are now created on a per-client basis. The
only exception is the pa_core's mempool which is still shared
between all clients of the system.
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Diffstat (limited to 'src/tests/srbchannel-test.c')
-rw-r--r-- | src/tests/srbchannel-test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/srbchannel-test.c b/src/tests/srbchannel-test.c index 253abcf58..9fc5d45b8 100644 --- a/src/tests/srbchannel-test.c +++ b/src/tests/srbchannel-test.c @@ -85,7 +85,7 @@ START_TEST (srbchannel_test) { int pipefd[4]; pa_mainloop *ml = pa_mainloop_new(); - pa_mempool *mp = pa_mempool_new(PA_MEM_TYPE_SHARED_POSIX, 0); + pa_mempool *mp = pa_mempool_new(PA_MEM_TYPE_SHARED_POSIX, 0, true); pa_iochannel *io1, *io2; pa_pstream *p1, *p2; pa_srbchannel *sr1, *sr2; |