X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Valgrind.git;a=blobdiff_plain;f=Valgrind.xs;h=b2108a2a58f5915280ce41f7738969777738368a;hp=a9f0eff0cf9a6a7119fc6d7ea849ef95a8124bef;hb=f1aad8ec2ce1d9605f720789dbb48fb3afbec3e8;hpb=b41c498738a3a4ccb8742883a42e6ea5addb1afd diff --git a/Valgrind.xs b/Valgrind.xs index a9f0eff..b2108a2 100644 --- a/Valgrind.xs +++ b/Valgrind.xs @@ -1,5 +1,5 @@ -/* This file is part of the Scalar::Vec::Util Perl module. - * See http://search.cpan.org/dist/Scalar-Vec-Util/ */ +/* This file is part of the Test::Valgrind Perl module. + * See http://search.cpan.org/dist/Test::Valgrind/ */ #define PERL_NO_GET_CONTEXT #include "EXTERN.h" @@ -18,6 +18,12 @@ const char *tv_leaky = NULL; +extern void tv_leak(void) { + tv_leaky = malloc(10000); + + return; +} + /* --- XS ------------------------------------------------------------------ */ MODULE = Test::Valgrind PACKAGE = Test::Valgrind @@ -33,7 +39,7 @@ BOOT: void leak() CODE: - tv_leaky = malloc(10000); + tv_leak(); XSRETURN_UNDEF; SV *