From owner-freebsd-hackers Sat Feb 6 01:24:05 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA14926 for freebsd-hackers-outgoing; Sat, 6 Feb 1999 01:24:05 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from itp.ac.ru (itp.ac.ru [193.233.32.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA14895 for ; Sat, 6 Feb 1999 01:23:55 -0800 (PST) (envelope-from ks@itp.ac.ru) Received: from speecart.chg.ru (speecart.chg.ru [193.233.46.2]) by itp.ac.ru (8.9.1/8.9.1) with ESMTP id MAA15064; Sat, 6 Feb 1999 12:27:26 +0300 (MSK) Message-ID: X-Mailer: XFMail 1.2 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199902052004.HAA22959@cimlogic.com.au> Date: Sat, 06 Feb 1999 12:23:05 +0300 (MSK) Organization: Landau Institute for Theoretical Physics From: "Sergey S. Kosyakov" To: John Birrell Subject: Re: Memory leak in pthread? Cc: freebsd-hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 05-Feb-99 John Birrell wrote: > Sergey S. Kosyakov wrote: >> This programm very quickly eats all the virtual memory. In "freebsd-hackers >> archive" I found some words about thread management by hand. More >> complicated >> program, where stacks are allocated/deallocated by malloc()/free() for each >> thread, eats memory not so quickly, but still eats, e.g. resident size (for >> each > > You need to detach the threads. > I add pthread_detach() after pthread_join(). Nothing was happened. Process size grows constantly. May be I should use completely detached threads, I mean I should never use pthread_join()? Sergey. --- ---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message