incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Kurz <>
Subject Re: [lucy-dev] Remaining CPAN module dependencies
Date Wed, 16 Mar 2011 00:42:38 GMT
> I started a thread on PerlMonks to see whether by custom compiling Perl we
> could coax the same functionality out of Valgrind that we can get out
> Test::LeakTrace.  Unfortunately, it looks like that won't work:

It's been a while since I've done this, but I have some vague memory
of having done something similar in the deep past.  But perhaps this
was at a time when Perl handled cleanup differently.  I presume you've
found the Valgrind macros for custom allocators and memory pools?

Could you just always access the Perl memory functions via wrappers
that inform Valgrind that memory is being allocated?  Or maybe I'm
misunderstanding the issue:  are you already doing this and the
problem is only with incrementing the refcounts of memory that Perl
has already allocated?   Although it's not a true allocation, it seems
like there would be a way to abuse Valgrind into tracking it like one.
 Tracking these by hand doesn't seem to bad either --- you could
probably even use the Valgrind macros to raise the alarm if something
is leaked.

I also feel compelled to mention that there is no prize for being the
purest piece of software in Apache.  If the lawyers don't feel there
is a problem in mentioning but not distributing a debug only target
that has a incompatible license, I don't feel compelled to remove it.
Also worth mentioning is that it doesn't hurt to ask the author of
Test::Leaktrace if it could be used under a different license.


View raw message