Re: Safefree() not so safe?
[email protected] ("Matthew Horsfall (alh)") Wed, 18 Dec 2013 12:42:20 -0500
| Newsgroups | perl.xs |
|---|---|
| Message-ID | <CAJ0K8bjxqxo6cCW6yrTrbDuAU0fMMgULD7X0B6YsR3+cHAkQ4A@mail.gmail.com> |
On Wed, Dec 18, 2013 at 10:24 AM, bulk 88 <[email protected]> wrote: >> It's possible the reason it wasn't crashing on your machine is that >> your Perl is configured to use malloc/free instead of Perl's own >> allocator. >> >> You can figure that out by checking perl -V for usemymalloc. >> >> If it's "=n", Perl is using whatever native calls are available on your >> system. >> >> If it's "=y", Perl is using its own internal wrapper. >> >> Cheers, >> >> -- Matthew Horsfall (alh) > > That information should not be used. Whatever implements Newx and > Safefree under the hood should be opaque. Win32 Perl has > "usemymalloc=n", but a Newx block isn't a malloc block. I didn't say it was. I was merely trying to explain why it might crash on one system and not another. -- Matthew Horsfall (alh)