diff options
author | Jim Cromie <jim.cromie@gmail.com> | 2009-06-11 16:28:46 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-06-21 14:11:51 +0200 |
commit | 73d1d97336c68e0f5b29937cb9347a00df4c645c (patch) | |
tree | d945b61ebc8c34d6fb4a39531391dcf7c98af98f /handy.h | |
parent | de10be12cd3b4d2e91c136c495230f49b31a4511 (diff) | |
download | perl-73d1d97336c68e0f5b29937cb9347a00df4c645c.tar.gz |
invert and rename PERL_MEM_LOG_STDERR to PERL_MEM_LOG_NOIMPL
Most users who want PERL_MEM_LOG want the default implementation,
give it to them. Users providing their own implementation can
obtain current behavior by adding -DPERL_MEM_LOG_NOIMPL.
Frankly, the average user probably wants _ENV by default too.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -761,7 +761,7 @@ PoisonWith(0xEF) for catching access to freed memory. * which more importantly get the immediate calling environment (file and * line number, and C function name if available) passed in. This info can * then be used for logging the calls, for which one gets a sample - * implementation if PERL_MEM_LOG_STDERR is defined. + * implementation unless -DPERL_MEM_LOG_NOIMPL is also defined. * * Known problems: * - all memory allocs do not get logged, only those @@ -783,6 +783,8 @@ PoisonWith(0xEF) for catching access to freed memory. * (keyed by the allocation address?), and maintain that * through reallocs and frees, but how to do that without * any News() happening...? + * - lots of -Ddefines to get useful/controllable output + * - lots of ENV reads when you get control -DPERL_MEM_LOG_ENV* */ PERL_EXPORT_C Malloc_t Perl_mem_log_alloc(const UV n, const UV typesize, const char *type_name, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname); @@ -792,7 +794,7 @@ PERL_EXPORT_C Malloc_t Perl_mem_log_realloc(const UV n, const UV typesize, const PERL_EXPORT_C Malloc_t Perl_mem_log_free(Malloc_t oldalloc, const char *filename, const int linenumber, const char *funcname); # ifdef PERL_CORE -# ifdef PERL_MEM_LOG_STDERR +# ifndef PERL_MEM_LOG_NOIMPL enum mem_log_type { MLT_ALLOC, MLT_REALLOC, |