[Gc] Memory leak in multithreaded application

Christophe Meessen meessen at cppm.in2p3.fr
Sat May 12 06:33:00 PDT 2007


Note that I am using gc 6.8 with no GC_DLL flag.

The start_thread(args) function is the proxy function I was suggesting
to use. It is already there and used when not compiling with the GC_DLL
flag.

Investigating source code, the _beginthreadex issue could be solved by
replacing the line 488 in libgc 6.8 win32_threads.c file
	thread_h = CreateThread(lpThreadAttributes,
with
	thread_h = (HANDLE)_beginthreadex(lpThreadAttributes,

and instering
        _endthreadex( ret );

before
        return ret;
at line 519 ( at end of start_thread() function).

But changing this and testing the code doesn't remove the leak.



More information about the Gc mailing list