|
|
|
@ -441,18 +441,32 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC) |
|
|
|
int had_leaks = 0; |
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined(ZEND_MM) && !ZEND_DEBUG |
|
|
|
if (clean_cache) { |
|
|
|
zend_mm_shutdown(&AG(mm_heap)); |
|
|
|
return; |
|
|
|
} |
|
|
|
#elif 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) { |
|
|
|
next_fast_cache_list_entry = fast_cache_list_entry->next; |
|
|
|
efree(fast_cache_list_entry); |
|
|
|
fast_cache_list_entry = next_fast_cache_list_entry; |
|
|
|
{ |
|
|
|
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) { |
|
|
|
next_fast_cache_list_entry = fast_cache_list_entry->next; |
|
|
|
efree(fast_cache_list_entry); |
|
|
|
fast_cache_list_entry = next_fast_cache_list_entry; |
|
|
|
} |
|
|
|
AG(fast_cache_list_head)[fci] = NULL; |
|
|
|
} |
|
|
|
AG(fast_cache_list_head)[fci] = NULL; |
|
|
|
} |
|
|
|
#endif /* ZEND_ENABLE_FAST_CACHE */ |
|
|
|
|
|
|
|
@ -564,13 +578,15 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache TSRMLS_DC) |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#ifdef ZEND_MM |
|
|
|
#if defined(ZEND_MM) && ZEND_DEBUG |
|
|
|
if (clean_cache) { |
|
|
|
zend_mm_shutdown(&AG(mm_heap)); |
|
|
|
return; |
|
|
|
} |
|
|
|
#elif defined(ZEND_WIN32) |
|
|
|
#elif defined(ZEND_WIN32) && ZEND_DEBUG |
|
|
|
if (clean_cache && AG(memory_heap)) { |
|
|
|
HeapDestroy(AG(memory_heap)); |
|
|
|
return; |
|
|
|
} |
|
|
|
#endif |
|
|
|
} |
|
|
|
|