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

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

index 07a100d4831a95ea308fdf769004e48e3910fbc3..448c1cbf75dc0a11cd426cb21de20d543f47f4de 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 d17899b9cf5e556f31a34d48e9f9aa7015abdd3a..2032238eb3cf2cfb16678c468787c612366b6e95 100644 (file)
@@ -677,6 +677,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      Sets how installed files will be laid out.  Type is
                           one of "PHP" (default) or "GNU"], PHP, no)
index 3b166d6cccd384fce952a93a115e98859149abe5..95c37a09fbbe1d817b9bab084a8cfb93a9ef40e6 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