[Gc] Memory leak in multithreaded application

Boehm, Hans hans.boehm at hp.com
Wed May 16 16:42:59 PDT 2007


> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Christophe Meessen
> Sent: Wednesday, May 16, 2007 1:28 PM
> To: gc at napali.hpl.hp.com
> Subject: Re: [Gc] Memory leak in multithreaded application
> 
> Hello,
> 
> thanks for reassuring clarification on memory usage increase. 
> Didn't tought of that. I'll do a very long run test ASAP.
> 
> Here is my feedback with compiling and running my small test 
> programm 7.0alpha 9.
> 
> 1. Compilation using "name /f NT_STATIC_THREADS_MAKEFILE" 
> went perfectly well. Just one warning reported, probably easy 
> to get rid of.:
> finalize.c(293) : warning C4098: 'GC_unreachable_finalize_mark_proc' :
> 'void' function returning a value

Thanks.  That does look fishy to me.

I checked in a fix to the CVS tree.  Since it's a void function
returning the result of a call to another void function, it may be that
some compilers allow it, and hence I hadn't noticed.

> 
> 2. When one uses GC_beginthreadex call instead of 
> GC_CreateThread there is no more memory leak. There is just 
> one little detail left to clear.
> The prototype (function signature) of GC_beginthreadex is 
> missing in gc.h at line 1007. There is also no GC_API in 
> front of the GC_beginthreadex definition. Is this ok ?

I would think that neither is OK.  I fixed both in my source tree and
added the thread exit functions as well.  I will check those in after
some testing.

My impression from the this discussion is that the CreateThread issue is
inherent in Windows, and therefore there is nothing else here that
should be fixed?

Hans

> 
> Static thread debug runs ok.
> 
> 
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> 



More information about the Gc mailing list