in reply to using a perl LoL and almost running out of memor
I find your question confusing, so I don't have an answer, but it reminds me of Strings and numbers: losing memory and mind., which I wrote a few weeks ago. In that case, my program continued to allocate memory after a large array was populated, even though I wasn't adding any more elements to the array. This turned out to be because the elements of the array were being converted from strings to numbers on the fly, and Perl would keep both representations for each one.
The solution for me was to explicitly make them numbers as I was reading them in (so instead of putting $x into the array, put in 0+$x so it's a number).
As I say, this might not be your problem, but if it is, my hope is that you wouldn't have to spend as much time figuring it out as I did.
|
|---|