Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Re: Perl XS: garbage-collecting my malloc'd buffer

by Elian (Parson)
on Mar 03, 2003 at 18:06 UTC ( [id://240096]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Perl XS: garbage-collecting my malloc'd buffer
in thread Perl XS: garbage-collecting my malloc'd buffer

Yep, that's still the case. SvGROW checks xpv_len, which'll be some bizarre value if the SV's just an IV or NV. Undef might well give it fits too, at least so reads the 5.8.0 sources.
  • Comment on Re: Re: Re: Perl XS: garbage-collecting my malloc'd buffer

Replies are listed 'Best First'.
Re^4: Perl XS: garbage-collecting my malloc'd buffer (sv_grow?)
by tye (Sage) on Mar 03, 2003 at 18:14 UTC

    Wouldn't calling sv_grow() directly fix that?

                    - tye
      Yep, it would. SvGROW tries to be clever, and fails, unfortunately. (And the docs discourage using sv_grow directly, just to compound the potential problems)

Log In?
Username:
Password:

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

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

    No recent polls found