cvs: Zend / zend_alloc.c
| From: | Andi Gutmans | Date: | Mon, 24 Jun 2002 18:53:22 +0000 |
| Subject: | cvs: Zend / zend_alloc.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-204@lists.php.net to get a copy of this message | ||
andi Mon Jun 24 14:53:22 2002 EDT
Modified files:
/Zend zend_alloc.c
Log:
- MFZE2 (Fixes some warnings and a bug introduced in an earlier patch)
Index: Zend/zend_alloc.c
diff -u Zend/zend_alloc.c:1.101 Zend/zend_alloc.c:1.102
--- Zend/zend_alloc.c:1.101 Mon Jun 24 13:51:12 2002
+++ Zend/zend_alloc.c Mon Jun 24 14:53:22 2002
@@ -398,20 +398,15 @@
ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC)
{
zend_mem_header *p, *t;
- unsigned int fci, i, j;
+
#if ZEND_DEBUG
int had_leaks = 0;
#endif
- zend_fast_cache_list_entry *fast_cache_list_entry, *next_fast_cache_list_entry;
-
-#if defined(ZEND_WIN32) && !ZEND_DEBUG
- if (clean_cache && AG(memory_heap)) {
- HeapDestroy(AG(memory_heap));
- return;
- }
-#endif
#if ZEND_ENABLE_FAST_CACHE
+ zend_fast_cache_list_entry *fast_cache_list_entry, *next_fast_cache_list_entry;
+ unsigned int fci;
+
for (fci=0; fci<MAX_FAST_CACHE_TYPES; fci++) {
fast_cache_list_entry = AG(fast_cache_list_head)[fci];
while (fast_cache_list_entry) {
@@ -421,10 +416,11 @@
}
AG(fast_cache_list_head)[fci] = NULL;
}
-#endif
+#endif /* ZEND_ENABLE_FAST_CACHE */
#if !ZEND_DISABLE_MEMORY_CACHE
if (1 || clean_cache) {
+ unsigned int i, j;
zend_mem_header *ptr;
for (i=1; i<MAX_CACHED_MEMORY; i++) {
@@ -439,7 +435,7 @@
AG(cache_count)[i] = 0;
}
}
-#endif
+#endif /* !ZEND_DISABLE_MEMORY_CACHE */
p = AG(head);
t = AG(head);
@@ -524,6 +520,13 @@
}
} while (0);
+#endif
+
+#if defined(ZEND_WIN32)
+ if (clean_cache && AG(memory_heap)) {
+ HeapDestroy(AG(memory_heap));
+ return;
+ }
#endif
}