develooper Front page | perl.perl5.porters | Postings from August 2021

Re: Is there a way to turn on extra debugging in perl

Thread Previous | Thread Next
From:
Dan Book
Date:
August 9, 2021 23:25
Subject:
Re: Is there a way to turn on extra debugging in perl
Message ID:
CABMkAVUtnPH+5MC+Nmcuo2y18ithzSNT+8_s6ZYzKmZdT+K1vg@mail.gmail.com
On Mon, Aug 9, 2021 at 7:16 PM L. Walsh <perl-diddler@tlinx.org> wrote:

> .... I just started getting
> Out of memory! at random times I'm trying to figure out
> where or what statement might be triggering
>
> free shows plenty of memory ....
> >  free
>               total        used        free      shared  buff/cache
> available
> Mem:      165036564     7948136   152956592        1648     4131836
> 155818956
> Swap:       8388604      227112     8161492
>
> I have Carp::Always on but I guess that doesn't apply to out-of-memory
> errors?
>

Correct, the only way to affect out of memory errors is by recompiling Perl
with specific options (to reserve a buffer for out-of-memory use) and then
using https://perldoc.perl.org/variables/$%5EM. Another option is to use
something like https://metacpan.org/pod/Devel::Trace as a hammer to log
everything that happens up until you run out of memory.

-Dan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About