summaryrefslogtreecommitdiff
path: root/src/tests/mcalign-test.c
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwish.07@gmail.com>2016-03-13 01:09:39 +0200
committerDavid Henningsson <david.henningsson@canonical.com>2016-04-02 05:53:33 +0200
commitee2db622778ae8038c9e178675978ad23f1300a2 (patch)
treef83eb13bf2360dd69e903d256b715daf7652271f /src/tests/mcalign-test.c
parentf8714af56bfcfeccd15a091c47492d3dc3008f61 (diff)
downloadpulseaudio-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/mcalign-test.c')
-rw-r--r--src/tests/mcalign-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/mcalign-test.c b/src/tests/mcalign-test.c
index f12197271..3127ccf30 100644
--- a/src/tests/mcalign-test.c
+++ b/src/tests/mcalign-test.c
@@ -36,7 +36,7 @@ int main(int argc, char *argv[]) {
pa_mcalign *a;
pa_memchunk c;
- p = pa_mempool_new(PA_MEM_TYPE_PRIVATE, 0);
+ p = pa_mempool_new(PA_MEM_TYPE_PRIVATE, 0, true);
a = pa_mcalign_new(11);