RE: Perl and memory...

2009-07-29 Thread Jean-Philippe.Ulpiano
-Philippe -Original Message- From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Chris Wagner Sent: Tuesday, July 28, 2009 8:57 PM To: perl-win32-users@listserv.ActiveState.com Subject: Re: Perl and memory

RE: Perl and memory...

2009-07-29 Thread Chris Wagner
At 12:30 PM 7/28/2009 -0700, Jan Dubois wrote: 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

Re: Perl and memory...

2009-07-28 Thread Chris Wagner
At 01:31 AM 7/25/2009 +0300, Serguei Trouchelle wrote: Or, as your question partially suggests, use threads: ending a thread will release the memory back to OS. Really? Is that documented anywhere? Knowing that could've saved me a lot of trouble on a massively threaded long running application

Re: Perl and memory...

2009-07-28 Thread Serguei Trouchelle
Chris Wagner wrote: Or, as your question partially suggests, use threads: ending a thread will release the memory back to OS. Really? Yes, here's an example (takes about 200M of memory and releases it): _ #!/usr/bin/perl -w use strict; use warnings; use threads; $| = 1; sub

Re: Perl and memory...

2009-07-28 Thread Chris Wagner
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? -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede

RE: Perl and memory...

2009-07-28 Thread Jan Dubois
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

Re: Perl and memory...

2009-07-28 Thread Serguei Trouchelle
doesn't work on Windows, so, I believe, it's up to OS. 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. Well, you may try

Perl and memory...

2009-07-24 Thread Amine
Hi all, Look at the following script: --- use Thread qw(:DEFAULT async yield); sub func { my @b; for ($i=0;$i100;$i++) { $b[$i] = 'Perl';} STDIN; undef @b; print '@b memory returned..'; STDIN; } @param = (); my $t = Thread-new(\func, @param);

Re: Perl and memory...

2009-07-24 Thread rocku
To answer your first question, take a look at Perl's FAQ: http://perldoc.perl.org/perlfaq3.html#How-can-I-free-an-array-or-hash-so-my-program-shrinks? Amine pisze: Hi all, Look at the following script: --- use Thread qw(:DEFAULT async yield);

Re: Perl and memory...

2009-07-24 Thread Amine
- Original Message - From: rocku rock...@gmail.com To: Amine ami...@colba.net Cc: perl-win32-users@listserv.ActiveState.com Sent: Friday, July 24, 2009 3:20 PM Subject: Re: Perl and memory... To answer your first question, take a look at Perl's FAQ: http://perldoc.perl.org/perlfaq3

Re: Perl and memory...

2009-07-24 Thread Serguei Trouchelle
Amine wrote: How can i 'force' Perl to return the used memory ? You cannot. This memory is actually free, you can still use it in your program, as you can see when you run func once again. Or, as your question partially suggests, use threads: ending a thread will release the memory back to

Perl 5.10 memory leak issue in Windows X64 environment

2008-04-08 Thread Bullock, Howard A.
I have a Perl 5.10 PerlSvc program compiled using PDK 7.1 executing in a 32-bit Windows environment that does not leak. The same program when placed on two different x64 servers is exhibiting a memory leak condition. Are any of modules listed below known to have issues in an x64 environment?