Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: PL_malloc_mutex in XS

by dave_the_m (Monsignor)
on Jul 15, 2014 at 14:28 UTC ( [id://1093715]=note: print w/replies, xml ) Need Help??


in reply to Re^2: PL_malloc_mutex in XS
in thread PL_malloc_mutex in XS

And, generally, how can I check, if perl caught a signal on memory allocating?
Generally, I think you're onto a loser here. Trying to make unsafe signals work is not easy, which is is why perl itself abandoned them about 10 years ago.

Normal perl builds use the OS's malloc() library, since its is likely to be superior to perl's own implementaion. You could of course build a perl with perl's malloc by using the -Dusemymalloc on the Configure commnand line, then you'd have a perl with a lockable malloc and rubbish performance.

Even then, you would still be able to do almost nothing in your signal handler, because just about anything you tried to do (apart now from malloc) would be unsafe.

Dave.

Replies are listed 'Best First'.
Re^4: PL_malloc_mutex in XS
by finisterra (Initiate) on Jul 16, 2014 at 11:58 UTC
    I can't use safe signals, because most part of my wishes are connected with MySQL. As I know, MySQL methods in perl wouldn't be terminated, when perl will catch safe signal.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1093715]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-23 23:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found