# The following was supposedly scribed by
# Sisyphus
# on Monday 20 June 2005 05:36 pm:

>I was surprised that the script in the cookbook produced that
>error (because the code looks correct to me) - and I don't know what
> the correct fix is. There's no problem with that cookbook script with
> perl 5.6.

No problem here with 5.8.4 on Linux.  But then, I don't even have to 
free(soldier) apparently.

Does it have something to do with strdup using something totally 
different than the malloc in perlapi's New() on windows?

Found this in perlguts, though I'm not sure what "enable" means:

"It is suggested that you enable the version of malloc that is 
distributed with Perl. It keeps pools of various sizes of unallocated 
memory in order to satisfy allocation requests more quickly. However, 
on some platforms, it may cause spurious malloc or free errors."

I see free() and malloc() defined in XSUB.h.  Are those then the ones 
that get compiled into strdup when you include string.h?

--Eric
-- 
The opinions expressed in this e-mail were randomly generated by
the computer and do not necessarily reflect the views of its owner.
--Management
---------------------------------------------
    http://scratchcomputing.com
---------------------------------------------

Reply via email to