Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8792473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:59:00+00:00 2026-06-13T22:59:00+00:00

Is there a standard(ish) way for a Perl interpreter (aka perl) to behave when

  • 0

Is there a standard(ish) way for a Perl interpreter (aka “perl”) to behave when it runs out of memory? Is it documented/specced-out in any way? Coded in some uniform way?

I’m especially interested in any standards which are expressed as covenant to Perl code being run – e.g., will die be called? Will END block be executed? Etc…

I’m fine with both an “theoretical” answer (e.g. some sort of generic “this is what perl code ought to do in general on out-of-memory” mission statement document from Larry/P5P/etc…, even if not 100% of malloc() calls follow this rule); or a “practical” statement (e.g. all malloc() calls in Perl are wrapped into a generic “allocate_memory” function which uniformly handles all failures).

It may be possible that the answer depends on what specifically causes out of memory (e.g. a request for more memory for Perl code’s data structure vs. memory allocated by internal Perl code unrelated to explicit “need to store more data” logic in Perl program).

If the answer is extremely implementation dependent, assume perl for Solaris/Linux,and narrowing down to any recent stable version (5.8 to 5.16) is acceptable.

The question is limited to standard Perl interpreter, however you wish to define that as far as pre-compile configuration (e.g. perl that comes with a major Linux distribution, or one compiled with all defaults left alone, etc…).

NOTE: This question came out of Gilles’s comment to another Q

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:59:01+00:00Added an answer on June 13, 2026 at 10:59 pm

    Taking a look at the manual page for the various diagnostic warnings that Perl will issue when the “use diagnostics” pragma is enabled, you can see various different types of “out of memory” errors and what they mean.

    So you can infer the “standard” behavior from these messages; the one with an exclamation point (“Out of memory!”) sounds like the one you’re asking about:

    Out of memory!
    (X) The malloc() function returned 0, indicating there was
    insufficient remaining memory (or virtual memory) to satisfy the
    request.  Perl has no option but to exit immediately.
    

    An “X” level error is labeled as “A very fatal error (nontrappable).”

    However if it’s a “large request” (for greater than 64K) it is trappable (I guess Perl assumes it’ll have enough memory to shutdown cleanly).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any standard way of debugging Javascript on a webpage that's being accessed
Is there a Standard(ish) or a way todo this is Visual Studio to dealing
is there a standard way to encode the user location (country, state/region, town), so
Is there a standard way of maintaining a weak pointer to a parent (which
Is there a standard or common way in C++ to handle static strings that
Is there a standard way / C# library to convert a string into a
In SQLite, with the standard C interface -- is there an easy way (even
Is there a standard way to not have fields label in a Yesod form?
Is there standard way to implement standard Iphone Check List like when you choose
Is there any standard validation class for checking whether the first character in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.