]> granicus.if.org Git - php/commitdiff
- Added the --disable-zend-memory-manager switch to disable the Zend memory
authorDerick Rethans <derick@php.net>
Tue, 7 Jun 2005 13:36:08 +0000 (13:36 +0000)
committerDerick Rethans <derick@php.net>
Tue, 7 Jun 2005 13:36:08 +0000 (13:36 +0000)
  manager.
#- I discussed this with Dmitry today - we found it useful.

Zend/zend_alloc.h
configure.in
ext/standard/info.c

index 21d7b5105260c79cf5fc9fe3e667e994af30e5f5..8b54b13de64014536ddac9c5c63fd5cb7b467205 100644 (file)
@@ -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 */
index 1db39657d8691a1e7b564260115bf9696a846dc8..10cf0134b4fa1d7b71f4bdbd19acd386e1d14b9e 100644 (file)
@@ -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)
index bc278b5f30240a9f1f88507672d7d46e581c2a45..ab0808280a16ebca874b29902f669f33757cc70a 100644 (file)
@@ -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