summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2002-06-24 13:41:26 +0000
committerAndi Gutmans <andi@php.net>2002-06-24 13:41:26 +0000
commit2172abcb0a9abd0b2d10d9a45e57b834e35ba4e9 (patch)
treecfc2dce977e66182c29ed4144470a7c86cd2c8f6 /Zend/zend_alloc.c
parent3b8cd875abc15b03fe912c4de9eca5890ba02708 (diff)
downloadphp-git-2172abcb0a9abd0b2d10d9a45e57b834e35ba4e9.tar.gz
- Don't use cache if we're using ZEND_MM
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r--Zend/zend_alloc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index d2a322e431..48d1f3e3fc 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -38,7 +38,11 @@ ZEND_API zend_alloc_globals alloc_globals;
#endif
+#ifdef ZEND_MM
+#define ZEND_DISABLE_MEMORY_CACHE 1
+#else
#define ZEND_DISABLE_MEMORY_CACHE 0
+#endif
#ifdef ZEND_MM
#define ZEND_DO_MALLOC(size) zend_mm_alloc(&AG(mm_heap), size)
@@ -416,8 +420,12 @@ ZEND_API void start_memory_manager(TSRMLS_D)
AG(allocated_memory_peak) = 0;
#endif
+#if ZEND_ENABLE_FAST_CACHE
memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head)));
+#endif
+#if !ZEND_DISABLE_MEMORY_CACHE
memset(AG(cache_count), 0, sizeof(AG(cache_count)));
+#endif
#ifdef ZEND_MM
zend_mm_startup(&AG(mm_heap), 256*1024);