good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Re: Re: Allocating more memory to perl process...by seattlejohn (Deacon) |
on Nov 13, 2002 at 02:02 UTC ( [id://212473]=note: print w/replies, xml ) | Need Help?? |
Are you sure you've implemented the recursive algorithm right in the first place? The fact that you say you're not moving that much data around -- yet you have recursion more than 100 levels deep -- makes me suspicious that you might inadvertantly have created the recursive equivalent of an infinite loop. 250MB is actually quite a lot of memory for most text-ish material.
One way to get a sense of what's going on in your recursion is to print the values of arguments each time the sub is entered. You may discover that your base case isn't returning properly, or that you're not decomposing the problem the way you thought you were, and thus not making progress with each recursive call. Apologies if this is obvious stuff that you've tried already, but I'd be wary of jumping to the conclusion that this is a perl or system issue before you're confident that the algorithm itself is correct. $perlmonks{seattlejohn} = 'John Clyman';
In Section
Seekers of Perl Wisdom
|
|