Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: How to capture out of memory excpetion in perl?

by haoess (Curate)
on Apr 23, 2008 at 09:26 UTC ( #682347=note: print w/ replies, xml ) Need Help??


in reply to How to capture out of memory excpetion in perl?

perldiag says:

Out of memory! (X) The malloc() function returned 0, indicating there was insufficien +t remaining memory (or virtual memory) to satisfy the request. Perl h +as no option but to exit immediately. At least in Unix you may be able to get past this by increasing your p +rocess datasize limits: in csh/tcsh use limit and limit datasize n (w +here n is the number of kilobytes) to check the current limits and ch +ange them, and in ksh/bash/zsh use ulimit -a and ulimit -d n , respec +tively.

But maybe you can fork the process out and capture the output/exit code.

-- Frank


Comment on Re: How to capture out of memory excpetion in perl?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://682347]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2015-07-04 20:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls