On Jun 20, 2005, at 8:04 PM, Eric Wilhelm wrote:
No problem here with 5.8.4 on Linux. But then, I don't even have to
free(soldier) apparently.
Really? It's not like Perl keeps track of Soldiers. No reference
counting there.
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."
Sounds like your onto something.
[ begin excerpt from http://perl.active-venture.com/pod/perlapi-
memory.html ]
savepv
Perl's version of strdup(). Returns a pointer to a newly allocated
string which is a duplicate of pv. The size of the string is
determined by strlen(). The memory allocated for the new string can
be freed with the Safefree() function.
[ end excerpt ]
Rob, if you switch savepv for strdup in the recipe, do the warnings
go away?
Marvin Humphrey
Rectangular Research
http://www.rectangular.com/