Quoting Craig Cardimon <[EMAIL PROTECTED]>:

> processing almost 70,000 files. Eventually it ran out of memory and 
> crashed.
> 
> I am clearing every variable as soon as I am done with it, but it's 
> simply not enough. I have found that if I run the script on 20 or 30,000
> 
> files at a time, stopping completely between runs, everything is fine.
> 
> I'm trying to come up with a loop that will process the first 20,000 
> files and then stop. When I run the script again, it will process the 
> next 20,000 files and then stop. And so on until it has processed all 
> the files in the current directory. The directory changes with each 
> monthly load. The script will keep track the files in that directory so
> 
> there are no duplicates.

Are you using Win32::ODBC? There's a memory leak in that modules which added 
about 6K to one of my script every time I created and disposed of a odbc 
object. I ended up creating the object once and reusing it for the life of the 
script.

I was also keeping the scope of file related variables very tight to makesure 
that memory was freed up and reused on each file processing cycle.

SD

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to