This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: free thread related memory created by pthread_create()


* 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]