summaryrefslogtreecommitdiffstats
path: root/debian/patches/7e2f6757fcc4eefd29cb47d8292714ac8014b9ef.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/7e2f6757fcc4eefd29cb47d8292714ac8014b9ef.patch')
-rw-r--r--debian/patches/7e2f6757fcc4eefd29cb47d8292714ac8014b9ef.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/7e2f6757fcc4eefd29cb47d8292714ac8014b9ef.patch b/debian/patches/7e2f6757fcc4eefd29cb47d8292714ac8014b9ef.patch
new file mode 100644
index 0000000..95c751f
--- /dev/null
+++ b/debian/patches/7e2f6757fcc4eefd29cb47d8292714ac8014b9ef.patch
@@ -0,0 +1,38 @@
+From 7e2f6757fcc4eefd29cb47d8292714ac8014b9ef Mon Sep 17 00:00:00 2001
+From: Wim Taymans <wtaymans@redhat.com>
+Date: Tue, 3 Oct 2023 18:33:46 +0200
+Subject: [PATCH] impl-node: do malloc_trim() after destroying a node.
+
+Fixes #1840
+---
+ src/pipewire/impl-node.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/src/pipewire/impl-node.c
++++ b/src/pipewire/impl-node.c
+@@ -28,6 +28,7 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include <time.h>
++#include <malloc.h>
+
+ #include <spa/support/system.h>
+ #include <spa/pod/parser.h>
+@@ -1873,6 +1874,7 @@
+ struct pw_impl_node *follower;
+ struct pw_context *context = node->context;
+ bool active, had_driver;
++ int res;
+
+ active = node->active;
+ node->active = false;
+@@ -1945,6 +1947,9 @@
+
+ spa_system_close(context->data_system, node->source.fd);
+ free(impl);
++
++ res = malloc_trim(0);
++ pw_log_debug("malloc_trim(): %d", res);
+ }
+
+ SPA_EXPORT