dmitry Thu Sep 14 08:00:45 2006 UTC
Modified files: (Branch: PHP_5_2)
/ZendEngine2 zend_alloc.c zend_alloc.h
Log:
Added is_zend_mm() to allow runtime check for zend memory manager
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_alloc.c?r1=1.144.2.3.2.9&r2=1.144.2.3.2.10&diff_format=u
Index: ZendEngine2/zend_alloc.c
diff -u ZendEngine2/zend_alloc.c:1.144.2.3.2.9
ZendEngine2/zend_alloc.c:1.144.2.3.2.10
--- ZendEngine2/zend_alloc.c:1.144.2.3.2.9 Thu Aug 31 11:53:57 2006
+++ ZendEngine2/zend_alloc.c Thu Sep 14 08:00:44 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.c,v 1.144.2.3.2.9 2006/08/31 11:53:57 dmitry Exp $ */
+/* $Id: zend_alloc.c,v 1.144.2.3.2.10 2006/09/14 08:00:44 dmitry Exp $ */
#include "zend.h"
#include "zend_alloc.h"
@@ -1619,6 +1619,15 @@
static zend_alloc_globals alloc_globals;
#endif
+ZEND_API int is_zend_mm(TSRMLS_D)
+{
+#if ZEND_USE_MALLOC_MM
+ return AG(mm_heap)->use_zend_alloc;
+#else
+ return 1;
+#endif
+}
+
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
TSRMLS_FETCH();
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_alloc.h?r1=1.63.2.2.2.2&r2=1.63.2.2.2.3&diff_format=u
Index: ZendEngine2/zend_alloc.h
diff -u ZendEngine2/zend_alloc.h:1.63.2.2.2.2
ZendEngine2/zend_alloc.h:1.63.2.2.2.3
--- ZendEngine2/zend_alloc.h:1.63.2.2.2.2 Tue Jul 25 13:40:05 2006
+++ ZendEngine2/zend_alloc.h Thu Sep 14 08:00:44 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.h,v 1.63.2.2.2.2 2006/07/25 13:40:05 dmitry Exp $ */
+/* $Id: zend_alloc.h,v 1.63.2.2.2.3 2006/09/14 08:00:44 dmitry Exp $ */
#ifndef ZEND_ALLOC_H
#define ZEND_ALLOC_H
@@ -95,6 +95,7 @@
ZEND_API void start_memory_manager(TSRMLS_D);
ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC);
+ZEND_API int is_zend_mm(TSRMLS_D);
#if ZEND_DEBUG
ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC
ZEND_FILE_LINE_ORIG_DC);
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|