summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-07-25 11:13:00 +0000
committerDmitry Stogov <dmitry@php.net>2007-07-25 11:13:00 +0000
commitd0ef6e9a95bfd143324a7bffef99779725213e5b (patch)
tree60f59ff1abf2ce352e5eabf31ae7ca99a0ef7b9d /Zend/zend_alloc.c
parent934b97d611c5a6938ba0c4ce58b299fe76ae310a (diff)
downloadphp-git-d0ef6e9a95bfd143324a7bffef99779725213e5b.tar.gz
Fixed bug #41713 (Persistent memory consumption on win32 since 5.2)
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 f6d61b4d50..7801750b90 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -1560,6 +1560,15 @@ ZEND_API void zend_mm_shutdown(zend_mm_heap *heap, int full_shutdown, int silent
free(heap);
}
} else {
+#ifdef HAVE_MEM_WIN32
+ /* FIX for bug #41713 */
+ /* TODO: add new "compact" handler */
+ if (storage->handlers->dtor == zend_mm_mem_win32_dtor &&
+ storage->handlers->init == zend_mm_mem_win32_init) {
+ HeapDestroy((HANDLE)storage->data);
+ storage->data = (void*)HeapCreate(HEAP_NO_SERIALIZE, 0, 0);
+ }
+#endif
heap->segments_list = NULL;
zend_mm_init(heap);
heap->real_size = 0;