mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
pulsecore: Transform pa_mempool_new() into a factory method
Soon we're going to have three types of memory pools: POSIX shm_open() pools, memfd memfd_create() ones, and privately malloc()-ed pools. Thus introduce annotations for the memory types supported and change pa_mempool_new() into a factory method based on required memory. Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
This commit is contained in:
parent
211a520543
commit
b88acd0266
18 changed files with 97 additions and 37 deletions
|
|
@ -55,6 +55,7 @@
|
|||
#include <pulsecore/core-util.h>
|
||||
#include <pulsecore/ipacl.h>
|
||||
#include <pulsecore/thread-mq.h>
|
||||
#include <pulsecore/mem.h>
|
||||
|
||||
#include "protocol-native.h"
|
||||
|
||||
|
|
@ -2621,7 +2622,7 @@ static void setup_srbchannel(pa_native_connection *c) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!(c->rw_mempool = pa_mempool_new(true, c->protocol->core->shm_size))) {
|
||||
if (!(c->rw_mempool = pa_mempool_new(PA_MEM_TYPE_SHARED_POSIX, c->protocol->core->shm_size))) {
|
||||
pa_log_warn("Disabling srbchannel, reason: Failed to allocate shared "
|
||||
"writable memory pool.");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue