Hi List, does anybody has deep information on how the garbage collector works in Perl?
Is there a possibility to influence it, to free memory (in the sense of give it back to the OS)? Let me show: { my $foo = 'X' x 100000000; getc; } undef $foo; my $foo = ""; getc; At the first prompt (via ps auxwf output): user 12310 2.1 4.8 211000 197024 pts/2 At the second prompt: user 12310 1.2 4.8 211000 197028 pts/2 Now, what I wanted to show: - the memory allocated for $foo is not released. What I read on several mailing-lists is that the optimizer does not return the memory to the OS, in the hope that the same variable will be used again. But what I'm missing is some kind of a 'free' statement in Perl, which definitely returns memory (and I not know yet). Regards, (I'm using perl 5.10.0 on OpenSUSE 11.0) -- Patrick Kirsch Bookandsmile GmbH Inselstraße 20 04103 Leipzig Tel: 0341 / 30 89 51 12 - Email: pkir...@bookandsmile.de Web: http://www.billigflieger.de | http://www.bookandsmile.de -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/