From owner-freebsd-hackers Sat Jan 23 09:05:46 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA22796 for freebsd-hackers-outgoing; Sat, 23 Jan 1999 09:05:46 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dream.demos.su (dream.demos.su [194.87.2.12]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA22781 for ; Sat, 23 Jan 1999 09:05:44 -0800 (PST) (envelope-from apg@demos.net) Received: (from uucp@localhost) by dream.demos.su (8.9.1/8.9.1) with UUCP id UAA27416 for hackers@freebsd.org; Sat, 23 Jan 1999 20:14:05 +0300 (MSK) (envelope-from apg@demos.net) Received: from localhost (apg@localhost) by caesar.corp.syntext.com (8.9.1/8.9.1) with ESMTP id UAA06784 for ; Sat, 23 Jan 1999 20:05:18 +0300 (MSK) (envelope-from apg@demos.net) X-Authentication-Warning: caesar.corp.syntext.com: apg owned process doing -bs Date: Sat, 23 Jan 1999 20:05:18 +0300 (MSK) From: Paul Antonov X-Sender: apg@caesar.corp.syntext.com To: hackers@FreeBSD.ORG Subject: pthreads memory leak in 3.0R ? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Greetings, while developing some application using ACE I discovered that program leaks memory when creating/destroying ACE tasks. I've tried to create/delete plain threads with ACE Thread_Manager, and effect is the same. Finally, I wrote the following program, and it consumes lots of memory during run. Something is wrong, I suppose? #include static void* func() { volatile int i; for(i = 0; i < 100; i++) ; } main() { pthread_t handle; int i; for(i = 0; i < 1000000; i++) { pthread_create(&handle, 0, func, 0); pthread_join(handle, 0); } } -- Paul To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message