-
Notifications
You must be signed in to change notification settings - Fork 45
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
Valgrind detects some memleaks #81
Comments
Moreover, this is just a plain "run program; wait; ctrl-c it (a signalfd is in place, so clean exit)". |
The "leaks" that valgrind is reporting are for a persistent data
structure constructed during library initialization that maps function
addresses to names. It is used by certain diagnostic routines. You are
correct that it is created by a library initialization function marked
"attribute((constructor))", and that there is no corresponding
destructor. There are many more dynamic data structures that are created
during library execution. All this memory will be released when the
program using the library is terminated. These allocations would
represent memory leaks only if the library were to be dynamically
unloaded by the application. Is that a use case for your application?
Sanford
…On 3/31/19 1:36 PM, Federico wrote:
Moreover, this is just a plain "run program; wait; ctrl-c it (a
signalfd is in place, so clean exit)".
It seems like there is some library init function marked with a
"*attribute*((constructor))" that allocates some memory that is not
freed by its destructor.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#81 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANhsbl2pAaiz9Oux44qvTreh-QewHUYlks5vcPIHgaJpZM4cUbwq>.
|
I see; even if i know they are not proper "memleaks", i always find it a good design to actually free memory, even before program's exit. But that's me, and my fixation :D |
Hi!
It seems like latest ddcutil (0.9.5) C api has some memleaks;
this is the output of a single run of my own program when built with ddcutil support:
ddcutil_leak.txt
Note that when building without ddcutil, no leak is shown.
Hopefully this will help you, thanks for this software!
The text was updated successfully, but these errors were encountered: