On Fri, 27 Aug 2004, Michael DrĂ¼ing wrote:
Hi,
running the program in WinXP results in an output like this: Failed to create thread 8 Failed to create thread 8 .... (repeated quite often) Failed to create thread 8 Failed to create thread 8 Program exit 33060
Watching the program with the taskmanager shows that it seems to only create about 2000 threads, after which it seems to get these "out of memory" errors.
Unless you've done something special, each thread gets a 1MB stack. So 2000 threads works out to about 2GB which exhausts the virtual memory space. I have not read the code but I assume you don't try to create 2000 concurrent threads. Could it be that somehow the resources used by each thread are not getting released?