Change 33629 by [EMAIL PROTECTED] on 2008/04/02 18:23:58
Fix bug in change 33379 - if we're using malloc_size() as well as being
careful to work with PERL_TRACK_MEMPOOL, we also have to be careful to
work *without* it.
Affected files ...
... //depot/perl/perl.h#836 edit
Differences ...
==== //depot/perl/perl.h#836 (text) ====
Index: perl/perl.h
--- perl/perl.h#835~33598~ 2008-03-29 04:21:46.000000000 -0700
+++ perl/perl.h 2008-04-02 11:23:58.000000000 -0700
@@ -4081,17 +4081,25 @@
#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);
End of Patch.