From: Zeev Suraski > Same questions here... The extra calls to ts_free_thread() seem > bogus. Not sure yet about the other changes although they probably make > more sense - I never made too much effort to ensure that the cleanup of a > thread is very complete...
You are correct. The ts_free_thread calls arent needed. Finally found out that there was a Layered Service Provider running which was screwing everything up as it kept attaching to every iis request and hosed things. My system kept allocating memory until finally crashing. After removing the LSP, iis started working much better as running apache bench with 20 simultaneous users each running 500 requests, memory only increased about 10MB which is pretty much correct concerning the amount of data gets stored on each thread once its initialized. Good news however is that some commercial software which wasnt working and the problems blamed on hyperthreading now work fine with the LSP removed. The other changes however are valid as the threads were not fully cleaned up and left large chunks of memory floating around after shutdown. From: Andi Gutmans > Also, how sure are you about this patch? What tool did you use for > debugging. To check the memory, I had _CrtDumpMemoryLeaks() log to a file after the tsrm_shutdown to test final leaks. Had to step through the code otherwise for other parts as the system would bail out without any indication of where. For the patch, the code for the isapi and apache2 sapi can be dumped as those added the ts_free_thread() calls, which I see are wrong. As I mentioned, the other changes work fine in windows. If no one sees anything glaring in those changes, I will gladly test them in another environment. Rob -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php