Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Out Of Memory

Status
Not open for further replies.

nitindn

Programmer
Feb 18, 2003
6
AU
Hi,
I am running a perl script to generate some XML file . During the execution of the script , I am using some large arrays. But I am getting an Error "Out Of Memory" .
How can I come to know as to which statement in the script caused this error.
I am using perl 5.005 on windows 2000 professional...
Please respond immediately

Regards
Nitin Nair
 
Out of memory is exactly what it says - get more RAM

To see where in the execution, you can either log your progress to a file or STDOUT.

The statement which causes the error is not likely to be the problem but the loop structure that it resides in

HTH
Paul
 
This might not be a problem of RAM, but more a case your code is hogging too much memory. Perl is reknowned for being a memory hog, as it doesn't immediately release unlinked memory back to the heap, just in case it needs it again.

Take a look at Devel::DProf [1] and Devel::LeakTrace [2], which might help you identify the areas in the code which are causing bottlenecks and/or are resource hungry.

[1] [2]
Barbie
Leader of Birmingham Perl Mongers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top