Greetings, This is an issue that I've had for a while actually as I had it in TDM-GCC one year ago.
Now, since TDM-GCC appears to be based on MinGW-w64's winpthread, I tried going back to the source hoping for a fix, and so I installed MinGW-w64 based on gcc 4.9.1 for x86_64, using posix threads, build revision 1. Basically, it appears there's a memory leak when std::threads are either created, joined or destructed, and so a simple testcase like __________________________________ #include <iostream> #include <thread> void tmp_thr(double a) { std::cout<<a<<std::endl; } int main() { int j; for(j=0;j<800000;j++) { std::thread tEx(tmp_thr,j); tEx.join(); } } __________________________________ makes the memory usage (as seen in the task manager) grow until either the program ends, or crashes. The leak appears to be fairly small, about 130 bytes of memory per thread so unless someone spawns millions of them (like I do) it won't be felt. I've been advised on the IRC channel to send this to the mailing list so here am I. Is there something incredibly wrong in this testcase or is there an issue with the compiler? Regards. ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public