On Wed, Sep 18, 2013 at 4:41 AM, Nick Wellnhofer <[email protected]> wrote:
> The buffer returned by Str_To_Utf8 is allocated with MALLOCATE which is a
> wrapper around the system malloc. So it should be safe to simply free() the
> buffer. The "free to wrong pool" seems to be related to the Perl allocator
> which isn't used in this case.

Ah, I thought it had something to do with conflicts between various
MSCVRT*.DLL files.  But yeah, a web search for "free to wrong pool" only turns
up Perl-related documents.

I'd suggest that we use a literal `malloc` instead of MALLOCATE inside of
Str_To_Utf8, because that allows us to experiment with alternative allocators
inside Clownfish::Util::Memory without screwing up what happens when a user
invokes free() on the pointer returned from To_Utf8.

Marvin Humphrey

Reply via email to