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

Stephen Manchester smanches at craftyspace.com
Wed Oct 3 15:10:15 CEST 2007

Christof was right on with this one.  I had tracked it down to an  
exception causing the thread to exit, but didn't know why the memory  
was still left around.  This explains it exactly.

Distributor.hh needs pthread_detach(pthread_self()); in all locations  
where the ::makeThread() function exits.  I have tested this and  
confirmed it solves the VM memory leak.

Thanks again Christof.  :p

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

More information about the Pdns-dev mailing list