This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use File::Find rather than shell globbing to get the list of *.pm files
[perl5.git] / perl.h
diff --git a/perl.h b/perl.h
index 87ad969..4cd9a2b 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -4073,20 +4073,33 @@ struct perl_memory_debug_header {
 #  define INIT_TRACK_MEMPOOL(header, interp)
 #endif
 
+#ifdef I_MALLOCMALLOC
+/* Needed for malloc_size(), malloc_good_size() on some systems */
+#  include <malloc/malloc.h>
+#endif
+
 #ifdef MYMALLOC
 #  define Perl_safesysmalloc_size(where)       Perl_malloced_size(where)
 #else
-#   ifdef HAS_MALLOC_SIZE
+#  ifdef HAS_MALLOC_SIZE
+#    ifdef PERL_TRACK_MEMPOOL
 #      define Perl_safesysmalloc_size(where)                   \
            (malloc_size(((char *)(where)) - sTHX) - sTHX)
-#   endif
-#   ifdef HAS_MALLOC_GOOD_SIZE
+#    else
+#      define Perl_safesysmalloc_size(where) malloc_size(where)
+#    endif
+#  endif
+#  ifdef HAS_MALLOC_GOOD_SIZE
+#    ifdef PERL_TRACK_MEMPOOL
 #      define Perl_malloc_good_size(how_much)                  \
            (malloc_good_size((how_much) + sTHX) - sTHX)
-#   else
+#    else
+#      define Perl_malloc_good_size(how_much) malloc_good_size(how_much)
+#    endif
+#  else
 /* Having this as the identity operation makes some code simpler.  */
 #      define Perl_malloc_good_size(how_much)  (how_much)
-#   endif
+#  endif
 #endif
 
 typedef int (CPERLscope(*runops_proc_t)) (pTHX);