in reply to Prevent "Out of Memory" error
You could monitor these before creating new objects and check if your script is using more than a "sane" amount and quit if the threshold is reached.use Gtop; my $gtop = GTop->new(); my $mem = $gtop->proc_mem($$); # Now you can use $mem->share / $mem->rss / $mem->vsize
|
|---|