[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Possible pthreads memory leak
zwegner%gmail.com@localhost (Zach Wegner) writes:
>So I'm hunting down a memory leak, and I notice that it occurs only
>when the program is threaded. I reproduced it with the simple threaded
>program below, which simply creates and joins threads repeatedly. At
>any point in time, there will be no more than two threads running. Its
>memory usage continuously grows, pretty quickly in fact:
> pthread_create(&tid, NULL, test, NULL);
> r = pthread_join(tid, &x);
I have seen this bug before, maybe the fix wasn't pulled up.
Does it help to follow the join with usleep(1) ?
Michael van Elst
"A potential Snark may lurk in every tree."
Main Index |
Thread Index |