mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-13 14:33:03 -04:00
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 |
||
|---|---|---|
| .. | ||
| aec | ||
| alsa | ||
| audioconvert | ||
| audiomixer | ||
| audiotestsrc | ||
| avb | ||
| bluez5 | ||
| control | ||
| ffmpeg | ||
| filter-graph | ||
| jack | ||
| libcamera | ||
| support | ||
| test | ||
| v4l2 | ||
| videoconvert | ||
| videotestsrc | ||
| volume | ||
| vulkan | ||
| meson.build | ||