Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
We don't bite newbies here... much
 
PerlMonks  

Re^3:Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"

by tachyon (Chancellor)
on Oct 27, 2004 at 18:50 UTC ( [id://403175]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"
in thread Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"

I was too lazy to look at the syntax of yet another macro. Storable is just one big macro! It is probably better to do:

if ( (unsigned)size > 1000000 ) CROAK(("Bugger!\n"));

Note that you need double parenths as the call to croak does not have any! croak is a Perl alias for Perl_croak_nocontext so the call is near identical but you are setting the context to dirty, looking at the source this is caught and cleaned so should fix the leak.

cheers

tachyon

  • Comment on Re^3:Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://403175]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.