free thread related memory created by pthread_create()
Florian Weimer
fw@deneb.enyo.de
Sun Jun 26 20:41:00 GMT 2016
* Joël Krähemann:
> The very last entry of following shows the issue with pthread_create():
>
> http://pastebin.com/aQfAQV2q
Usually, this is due to a race condition at process termination.
valgrind may or may not report the resources of a thread still running
at process termination as leaked.
You can avoid the valgrind warning by delaying exit until all other
threads have terminated.
It is not a memory leak in the classic because this happen only during
process termination, just before the kernel is about to free all
process memory anyway.
More information about the Libc-help
mailing list