summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-09-14 08:00:44 +0000
committerDmitry Stogov <dmitry@php.net>2006-09-14 08:00:44 +0000
commit27c327b97e1ffa68fe22c252ca7d24ecd073c699 (patch)
treeecf1288faeaf132b4871f719deaf2863c22d84eb /Zend/zend_alloc.c
parent38540337a90400b249953e14661f4364e299b6d6 (diff)
downloadphp-git-27c327b97e1ffa68fe22c252ca7d24ecd073c699.tar.gz
Added is_zend_mm() to allow runtime check for zend memory manager
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r--Zend/zend_alloc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index d2bb14cb28..c132175737 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -1619,6 +1619,15 @@ static int alloc_globals_id;
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();