I have a server that implemented in C++ running on a Windows 2003 enterprise with 25GB RAM.
During a stress test, I see when it is trying to create a new thread by calling _beginthread, I got ENOMEM which means “Not enough memory”.
But I don’t understand why it is out of memory, perfmon data shows that at that time, the process has used 1.2GB VM and similar physical memory, there are only 250 threads.
Can anyone help me to analyse or explain why I still got this error?
It ended up because of a memory leak in our application.