princepawn has asked for the wisdom of the Perl Monks concerning the following question:

we are running perl 5.6.1 and I had a program that starting spewing this error
Out of memory during request for 1696 bytes, total sbrk() is 8221976 b +ytes! accept: Interrupted system call at /home/tmbranno/cpan/lib/perl5/site_ +perl/5.6.\ 1/Net/FTPServer.pm line 2514.
I did a diff on my previously working source file and the only change is use diagnostics

I could not believe it, but I commented it out and the error disappeared?

Does this pragma require a lot of memory for some reason?

Replies are listed 'Best First'.
Re: use diagnostics eats memory?
by Anonymous Monk on Jun 27, 2001 at 19:54 UTC
    Where do you think it stores the explanations?

      Perl chooses "use more memory" in almost all design decisions. See (tye)Re: Generate all possibilities for a recent example of how much memory Perl can require to store a list.

      It would probably be a lot of work to modify diagnostics.pm to run slower by not caching the modified contents of perldiag.pm in memory.

      A few complaints were filed about recent suggestions to always use diagnostics or I would have filed one myself. The only value I see in diagnostics is after you've found an error that you don't understand or for abject newbies writing small code. I'd rather encourage the use of "-Mdiagnostics" when an error isn't understood.

      Certainly you shouldn't be doing use diagnostics in production code.

              - tye (but my friends call me "Tye")