From: Stanislav Malyshev Date: Tue, 31 Aug 2004 15:32:09 +0000 (+0000) Subject: if not using Zend's alloc, don't touch _emalloc X-Git-Tag: php-4.3.9RC3~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a27e5a0c1c9f62d760d2ff69574649c5584fbbe;p=php if not using Zend's alloc, don't touch _emalloc --- diff --git a/main/streams.c b/main/streams.c index 4a1be60af4..ebc76c3345 100755 --- a/main/streams.c +++ b/main/streams.c @@ -59,6 +59,7 @@ static php_stream_wrapper php_plain_files_wrapper; /* {{{ some macros to help track leaks */ #if ZEND_DEBUG +#if USE_ZEND_ALLOC #define emalloc_rel_orig(size) \ ( __php_stream_call_depth == 0 \ ? _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_RELAY_CC) \ @@ -68,7 +69,10 @@ static php_stream_wrapper php_plain_files_wrapper; ( __php_stream_call_depth == 0 \ ? _erealloc((ptr), (size), 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_RELAY_CC) \ : _erealloc((ptr), (size), 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC) ) - +#else +#define emalloc_rel_orig(size) emalloc(size) +#define erealloc_rel_orig(ptr, size) erealloc(ptr, size) +#endif #define pemalloc_rel_orig(size, persistent) ((persistent) ? malloc((size)) : emalloc_rel_orig((size))) #define perealloc_rel_orig(ptr, size, persistent) ((persistent) ? realloc((ptr), (size)) : erealloc_rel_orig((ptr), (size)))