WG: Memory Problem with POSIX Thread under Windows XP

Martin Jöhren m.joehren@hoppe-bmt.de
Tue Aug 22 11:46:00 GMT 2006


I tried following code with vs2005, and... there is no memory problem! So
the bug must be located in CYGWIN or in GCC. Form now on it seems to me,
that I really need help. Cause I'm not so familiar with deeper CYGWIN or GCC
problems. I'm looking foward for any ideas how to handle the problem...

THX

#include "stdafx.h"
#include "windows.h"

DWORD WINAPI testThread(LPVOID lpParam)
{
	double k = 1.23223423;
	printf("\r\n %f \r\n",k);
	return 0;
}

int _tmain(int argc, _TCHAR* argv[])
{
	HANDLE tHandle;


	while(1)
	{
		tHandle = CreateThread(
				  NULL,
				  NULL,
				  &testThread,
				  NULL,
				  NULL,
				  NULL
				);
		WaitForSingleObject(tHandle,1000);
		CloseHandle(tHandle);
	}
	return 0;
}

 



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list