pipewire/spa
Torkel Niklasson 65a5fa0250 audioconvert: allocate port buffers dynamically
The port buffer table was embedded in struct port as a fixed array
buffers[MAX_BUFFERS] of struct buffer, each holding datas[MAX_DATAS]
(MAX_DATAS == SPA_AUDIO_MAX_CHANNELS == 64). This reserved ~17 KB per
port regardless of the actual buffer/channel count, multiplied by every
active port.

Allocate the buffer table and the per-buffer data-pointer pool in a
single calloc in port_use_buffers(), sized to the real number of
buffers and blocks, and release it in clear_buffers(). free_dir() now
clears each port so the allocation (and any mmapped buffer data) is
released on node destruction. This mirrors the dynamic-allocation
approach already used for the channelmix matrices and preserves a lot
of memory in the common low-channel-count case.

Co-authored-by: Copilot copilot@github.com
2026-06-12 18:19:35 +00:00
..
examples examples: set diffent Clock and Position on source 2026-05-11 14:02:29 +02:00
include port-config: add internalFormat to PortConfig 2026-06-12 17:50:46 +02:00
include-private/spa-private spa: move dbus helpers out of bluez plugin 2024-02-05 13:03:20 +00:00
lib spa: update lib.c 2026-03-09 18:33:32 +01:00
plugins audioconvert: allocate port buffers dynamically 2026-06-12 18:19:35 +00:00
tests tests: don't redefine spa_assert 2026-05-25 11:05:35 +02:00
tools tools: port various tools to the new json-builder 2026-02-26 10:51:17 +01:00
meson.build meson: Always use -fno-strict-aliasing and -fno-strict-overflow 2025-07-24 07:30:28 +00:00