in reply to Uncollected garbage leads to swapping ...

Your comment about tuning the garbage collector is appropriate to an environment (like, say, most jvms) which doesn't collect garbage immediately when the reference count reaches 0. Perl, however, doesn't do that.

Perl 5.8.0 does however have a few known memory leaks - I suggest you check to see if your bug is mentioned on http://rt.perl.org. Googling for "perl 5.8.0 memory leak" may also prove useful. One thing you may find is that it's not your hashes that are leaking - as you haven't told us what else you do in your code, it's hard to say. (It's been reported that in some perl versions, simply having a versioned "use" statement in a loop will end up leaking memory)

I'll add what another poster here said - see if you can reduce the code to a simple example that leaks and that you can post.

  • Comment on Re: Uncollected garbage leads to swapping ...