[Pdns-dev] Re: virtual memory issue and gmysql

Christof Meerwald cmeerw at cmeerw.org
Thu Oct 4 20:44:59 CEST 2007


On Wed, 3 Oct 2007 14:10:15 -0700, Stephen Manchester wrote:
> Distributor.hh needs pthread_detach(pthread_self()); in all locations  
> where the ::makeThread() function exits.

Alternatively, you should be able to do the pthread_detach only once right
after the thread has been created (at the top of the makeThread function) -
there is no need to wait until the thread is about to exit to detach it.


Christof

> On Oct 3, 2007, at 1:09 PM, Christof Meerwald wrote:
>
>> On Wed, 3 Oct 2007 21:50:16 +0200, Christof Meerwald wrote:
>>> So I strongly suspect that threads are being created but never
>>> joined/detached.
>>
>> I have now also confirmed with a simple test-case that Linux (NPTL)  
>> only
>> cleans up the thread stack of terminated threads if they have been  
>> detached
>> or joined (one could, of course, argue that this implementation  
>> detail could
>> be improved as there is no need to keep the thread stack around for  
>> zombie
>> threads).
>>
>>
>> Christof
>>
>> -- 
>>
>> http://cmeerw.org                              sip:cmeerw at  
>> cmeerw.org
>> mailto:cmeerw at cmeerw.org                   xmpp:cmeerw at  
>> cmeerw.org
>> _______________________________________________
>> Pdns-dev mailing list
>> Pdns-dev at mailman.powerdns.com
>> http://mailman.powerdns.com/mailman/listinfo/pdns-dev

-- 

http://cmeerw.org                              sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org                   xmpp:cmeerw at cmeerw.org


More information about the Pdns-dev mailing list