
21 Jan
2007
21 Jan
'07
11:17 a.m.
Peter Dimov wrote:
As you can see, the block has been allocated by pthread_create, not by Boost.Threads.
Pete, as already pointed out by Peter, the leak seems to be caused by the pthread library, not boost. Most likely it isn't harmful. It looks independent of the number of threads created. I guess it is related to thread local storage management. You might try the below code snippet, which gives me the same valgrind report than the example using Boost.Thread: #include <pthread.h> void* fn(void* p) { return NULL; } int main() { pthread_t th; pthread_create(&th, NULL, fn, NULL); pthread_join(th, NULL); return 0; } Regards, Roland