-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ALSA Memory Leaks #447
Comments
It would be great if you can submit a PR! We have had some people submit memory leak fixes in the past but it is possible there have been more recent changes to the API that require further updates.
On Nov 27, 2024, at 6:25 AM, mttjcksn ***@***.***> wrote:
Hi there,
We have encountered a large number of possible memory leaks reported by valgrind memcheck using the ALSA backend in our application.
This can can replicated with the audioprobe and record examples. See the memcheck logs for those test apps:
audioprobe-mem.log<https://github.com/user-attachments/files/17932534/audioprobe-mem.log>
record-mem.log<https://github.com/user-attachments/files/17932536/record-mem.log>
In this note<https://github.com/alsa-project/alsa-lib/blob/master/MEMORY-LEAK>, alsa-project state that not calling snd_config_update_free_global() after all snd_*_open*() calls can lead to leaks. This call frees the global configuration tree and sets snd_config to null, as documented here<https://alsa-project.org/alsa-doc/alsa-lib/group___config.html#ga51dbc0ff1d9b34d753706d09d768116b>.
Sure enough, when I edit RtAudio.cpp to ensure that this is done where appropriate, the memcheck logs for audioprobe and record are clean. See below:
audioprobe-mem-fix.log<https://github.com/user-attachments/files/17932538/audioprobe-mem-fix.log>
record-mem-fix.log<https://github.com/user-attachments/files/17932541/record-mem-fix.log>
Has this been addressed before? I can create a PR if required.
Many thanks
—
Reply to this email directly, view it on GitHub<#447>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABJYDJLXXG62NQQ5WNFYOFL2CWTZRAVCNFSM6AAAAABSSTMZ2KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY4TQMJZGQ2TEMY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
We have encountered a large number of possible memory leaks reported by valgrind memcheck using the ALSA backend in our application.
This can can replicated with the
audioprobe
andrecord
examples. See the memcheck logs for those test apps:audioprobe-mem.log
record-mem.log
In this note, alsa-project state that not calling
snd_config_update_free_global()
after allsnd_*_open*()
calls can lead to leaks. This call frees the global configuration tree and sets snd_config to null, as documented here.Sure enough, when I edit RtAudio.cpp to ensure that this is done where appropriate, the memcheck logs for audioprobe and record are clean. See below:
audioprobe-mem-fix.log
record-mem-fix.log
Has this been addressed before? I can create a PR if required.
Many thanks
The text was updated successfully, but these errors were encountered: