On Tue, 28 Jul 2009, Chris Wagner wrote: > At 06:48 PM 7/28/2009 +0300, Serguei Trouchelle wrote: > > I'm not sure. Ending thread on Windows deallocates memory as it said > > in MSDN, but I'm not exactly sure how Perl handles all this stuff. > > So that could be Windows specific? The application I made was on > Solaris. I actually thought it was a memory leak in my code. After I > found out Perl couldn't free() memory I gave up on trying to shrink > the process size and implemented a multiprocess system to deal with > the memory issue. It was ActiveState Perl though. Jan?
I'm somewhat surprised that even the Windows version returns memory back to the OS. Perl on Windows used to use separate heaps for each interpreter and they got freed when the interpreter got freed. But nowadays everything is using malloc/free from the C runtime library. So I guess it really depends on the runtime library if it will return heap blocks back to the system or not. It is also not clear to me if you were looking at physical or virtual memory allocation. In some ways it doesn't make sense to obsess about returning memory to the OS too much: if you don't use it anymore, it will just get paged out to disk. And other processes have their own virtual memory anyways. Cheers, -Jan _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs