This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: WG: Memory Problem with POSIX Thread under Windows XP


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]