diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-22 20:03:33 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-22 20:03:33 +0000 |
commit | 0f911915e776475d30872d1f6e0b5a8fb482fba4 (patch) | |
tree | a9bcdeb0bd31f8330c6608e6ca3d6f11c38ec64e /pod | |
parent | 2de59751decb6dee5cba6bbaca778d093d173b3e (diff) | |
download | perl-0f911915e776475d30872d1f6e0b5a8fb482fba4.tar.gz |
Tweak from John P. Linderman.
p4raw-id: //depot/perl@15425
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlhack.pod | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pod/perlhack.pod b/pod/perlhack.pod index 5842fcd211..bb54e7359d 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -1867,6 +1867,17 @@ which creates a binary named 'pureperl' that has been Purify'ed. This binary is used in place of the standard 'perl' binary when you want to debug Perl memory problems. +To minimize the number of memory leak false alarms +(see L</PERL_DESTRUCT_LEVEL>), set environment variable +PERL_DESTRUCT_LEVEL to 2. + + setenv PERL_DESTRUCT_LEVEL 2 + +In Bourne-type shells: + + PERL_DESTRUCT_LEVEL=2 + export PERL_DESTRUCT_LEVEL + As an example, to show any memory leaks produced during the standard Perl testset you would create and run the Purify'ed perl as: @@ -2001,8 +2012,9 @@ There is a way to tell perl to do complete cleanup: set the environment variable PERL_DESTRUCT_LEVEL to a non-zero value. The t/TEST wrapper does set this to 2, and this is what you need to do too, if you don't want to see the "global leaks": +For example, for "third-degreed" Perl: - PERL_DESTRUCT_LEVEL=2 ./perl.third t/foo/bar.t + env PERL_DESTRUCT_LEVEL=2 ./perl.third -Ilib t/foo/bar.t =head2 Profiling |