From: Derick Rethans Date: Tue, 7 Jun 2005 13:36:08 +0000 (+0000) Subject: - Added the --disable-zend-memory-manager switch to disable the Zend memory X-Git-Tag: php-5.0.1b1~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a3dbcd1c45fccc6657c3aba5d00164918224c7d;p=php - Added the --disable-zend-memory-manager switch to disable the Zend memory manager. #- I discussed this with Dmitry today - we found it useful. --- diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 21d7b51052..8b54b13de6 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -85,8 +85,6 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; -#define USE_ZEND_ALLOC 1 - #if USE_ZEND_ALLOC /* Standard wrapper macros */ diff --git a/configure.in b/configure.in index 1db39657d8..10cf0134b4 100644 --- a/configure.in +++ b/configure.in @@ -623,6 +623,16 @@ else ZEND_DEBUG=no fi +PHP_ARG_ENABLE(zend-memory-manager,whether to enable the Zend memory manager, +[ --disable-zend-memory-manager + Disable the Zend memory manager (DEVELOPERS ONLY)],yes, no) + +if test "$PHP_ZEND_MEMORY_MANAGER" = "yes"; then + AC_DEFINE(USE_ZEND_ALLOC, 1, [ ]) +else + AC_DEFINE(USE_ZEND_ALLOC, 0, [ ]) +fi + PHP_ARG_WITH(layout,[layout of installed files], [ --with-layout=TYPE Set how installed files will be laid out. Type is one of "PHP" or "GNU" [TYPE=PHP]], PHP, no) diff --git a/ext/standard/info.c b/ext/standard/info.c index bc278b5f30..ab0808280a 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -469,6 +469,12 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) php_info_print_table_row(2, "Thread Safety", "disabled" ); #endif +#if USE_ZEND_ALLOC + php_info_print_table_row(2, "Zend Memory Manager", "enabled" ); +#else + php_info_print_table_row(2, "Zend Memory Manager", "disabled" ); +#endif + #if HAVE_IPV6 php_info_print_table_row(2, "IPv6 Support", "enabled" ); #else