Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: [XS] sv_setpv change in behaviour with perl-5.42.0 and later

by dave_the_m (Monsignor)
on Jan 27, 2026 at 09:06 UTC ( [id://11167244]=note: print w/replies, xml ) Need Help??


in reply to [XS] sv_setpv change in behaviour with perl-5.42.0 and later

You're seeing Copy-on-Write (COW) affects. Post 5.40, $buffer's string buffer is being shared with the (constant folded at compiletime) constant SV's buffer which is holding the value of 'z' x 60. When $buffer is assigned to, the COW mechanism leaps into action, and it's given its own string buffer (only as big as it needs to be) to store the changed value.

Dave.

  • Comment on Re: [XS] sv_setpv change in behaviour with perl-5.42.0 and later

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2026-04-19 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    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.