From owner-freebsd-threads@FreeBSD.ORG Thu Sep 29 12:35:50 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from [127.0.0.1] (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 4A8DB16A41F; Thu, 29 Sep 2005 12:35:48 +0000 (GMT) (envelope-from davidxu@freebsd.org) Message-ID: <433BDFAA.6070307@freebsd.org> Date: Thu, 29 Sep 2005 20:35:54 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.10) Gecko/20050806 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lefteris Tsintjelis References: <433BBBD9.3070000@ene.asda.gr> In-Reply-To: <433BBBD9.3070000@ene.asda.gr> Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-threads@freebsd.org Subject: Re: pthread_key_create memory leakage in pthreads? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2005 12:35:50 -0000 Lefteris Tsintjelis wrote: > Hi, > > dmesg: FreeBSD 5.4-STABLE #0: Sun Sep 25 20:08:39 EEST 2005 > > I am using valgrind to check my program but it always seems to come > with this > message: > > ==8210== 600 bytes in 3 blocks are definitely lost in loss record 3 of 6 > ==8210== at 0x3C03619F: malloc (in > /usr/local/lib/valgrind/vgpreload_memcheck.so) > ==8210== by 0x3C0978EC: (within > /usr/local/lib/valgrind/libpthread.so.1) > ==8210== by 0x3C09A2FD: (within > /usr/local/lib/valgrind/libpthread.so.1) > ==8210== by 0x3C09A489: pthread_key_create (in > /usr/local/lib/valgrind/libpthread.so.1) > > I am not sure if its accurate or not. I use a proper pthread_exit in > my thread. > Is there anything more that I should do besides that? > > Please CC > > Thnx, > > Lefteris > > The thread library is valgrind's version, the path is /usr/local/lib/valgrind/libpthread.so.1, it is not the native FreeBSD thread library. David Xu