From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24381 invoked by alias); 19 Mar 2004 21:01:59 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 24374 invoked from network); 19 Mar 2004 21:01:57 -0000 Received: from unknown (HELO omacws02) (199.38.51.26) by sources.redhat.com with SMTP; 19 Mar 2004 21:01:57 -0000 Received: From omacex02.corp.westworlds.com ([10.0.35.226]) by omacws02 (WebShield SMTP v4.5 MR1a); id 1079730381281; Fri, 19 Mar 2004 15:06:21 -0600 Received: from omacex06.corp.westworlds.com ([10.0.17.201]) by omacex02.corp.westworlds.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 19 Mar 2004 15:01:03 -0600 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: memory leak?? Date: Fri, 19 Mar 2004 21:01:00 -0000 Message-ID: <759C12D9893C354785F7FFE43B4155000B34F1@omacex06.corp.westworlds.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Arnett, Don L." To: X-OriginalArrivalTime: 19 Mar 2004 21:01:03.0201 (UTC) FILETIME=[49F2BD10:01C40DF5] X-SW-Source: 2004/txt/msg00036.txt.bz2 I'm new to using pthreadsWin32. According to the TaskMgr display this prog= ram is using about 28K more memory at the second getchar() than it was at t= he first getchar(). I found a couple of discussions of memory leaks in the= list archives and it usually was a programmer problem, but I don't see wha= t I'm missing. Thanks for any input. #include #include #include void *pvDoSomething(void *poThreadArgs); int main(int argc, char* argv[]) { pthread_t *poThread; getchar(); poThread =3D (pthread_t*)calloc(1,sizeof(pthread_t)); pthread_create(poThread,NULL,pvDoSomething,NULL); pthread_detach(*poThread); =09 free(poThread); getchar(); return 0; } void *pvDoSomething(void *poThreadArgs) { return NULL; }