Devel::Leak is a somewhat specialized module to hunt for hard to find

memory bugs in perl XS code.
This commit is contained in:
espie 2007-04-16 21:06:05 +00:00
parent 233e08b5e7
commit 2bd6cc3a2f
4 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,16 @@
# $OpenBSD: Makefile,v 1.1.1.1 2007/04/16 21:06:05 espie Exp $
COMMENT= "finding memory leaks in perl XS"
SHARED_ONLY= Yes
MODULES= cpan
DISTNAME= Devel-Leak-0.03
CATEGORIES= devel
# perl
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (Devel-Leak-0.03.tar.gz) = nuLPiL0dvGCR4470WXtUuw==
RMD160 (Devel-Leak-0.03.tar.gz) = Sf0QqOllUvD+LA3+0T866m3CFVc=
SHA1 (Devel-Leak-0.03.tar.gz) = YOr7SyOrowHW+5p2wW7bc/WIMPQ=
SHA256 (Devel-Leak-0.03.tar.gz) = b0LDTxHitOPqLg5rlBaoimha3UR5EMr02R3SwXgXclI=
SIZE (Devel-Leak-0.03.tar.gz) = 3233

View File

@ -0,0 +1,12 @@
Devel::Leak has two functions NoteSV and CheckSV.
NoteSV walks the perl internal table of allocated SVs (scalar values) - (which
actually contains arrays and hashes too), and records their addresses in a
table. It returns a count of these "things", and stores a pointer to the
table (which is obtained from the heap using malloc()) in its argument.
Note that you need a perl built with -DDEBUGGING for
sv_dump() to print anything, but counts are valid in any perl.
If new "things" have been created, CheckSV may (also) report additional
"things" which are allocated by the sv_dump() code.

View File

@ -0,0 +1,10 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/04/16 21:06:05 espie Exp $
${P5ARCH}/
${P5ARCH}/Devel/
${P5ARCH}/Devel/Leak.pm
${P5ARCH}/auto/
${P5ARCH}/auto/Devel/
${P5ARCH}/auto/Devel/Leak/
${P5ARCH}/auto/Devel/Leak/Leak.bs
${P5ARCH}/auto/Devel/Leak/Leak.so
@man man/man3p/Devel::Leak.3p