From: Patrick Kirsch <pkir...@bookandsmile.de> > Jenda Krynicky schrieb: > > Why do you think weakref would help you? Do you have any cyclic data > > structures that are not getting released? Other than memory leaks > > like that, weakref is not gonna do anything about the memory > > footprint. See Devel::Leak to find out if you have leaks. > > > As there are hashes exported between modules, I marked them as weak.
Then do not be surprised if they suddenly disappear. > As long I can not assure that aren't cyclic references. If the memory footprint keeps on growing, try the Devel::Leak and see. > >> I thought a lot of people are using Perl and they probably did hit the > >> memory footprint issue. I searched the mail archives, there was an > >> discussion in ~2002 about this issue, sadly without a solution. > >> > > > > It's hard to give an advice since we do not know what data are you > > dealing with and we have not seen your code, but you might have a > > look at PDL (http://search.cpan.org/search?query=PDL&mode=all) > > > > If you are working with huge strings, make sure you do not make > > unnecessary copies (like by foo( "$var") etc. > > > Do you know of debug switch or module which marks such issues? > (I'm aware that the method of "closer inspection" is the one to choose > :-) ). Maybe Perl::Critic can find some of those. > > In either case, you're most likely wasting your time with the garbage > > collector. Worry about your code. > > > But I still think of patching the garbage collector in that way, that > not only the memory of huge arrays is returned but also the small scalars. > In my situation the execution time is not primary but the count of > parallelism (and this is currently restricted by memory consumption). Some of the memory of small scalars is retained so that creating new scalars is quicker. That's not your problem. In either case patching the perl garbage collector will be a helova lot of work. Rebuilding perl with different switches might make some difference and might even be worth the effort, patching the insides of perl is not. Not in this case. Jenda ===== je...@krynicky.cz === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/