summaryrefslogtreecommitdiff
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
parent934b97d611c5a6938ba0c4ce58b299fe76ae310a (diff)
downloadphp-git-d0ef6e9a95bfd143324a7bffef99779725213e5b.tar.gz
Fixed bug #41713 (Persistent memory consumption on win32 since 5.2)
-rw-r--r--NEWS1
-rw-r--r--Zend/zend_alloc.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 8056a54b04..be6e96bff8 100644
--- a/NEWS
+++ b/NEWS
@@ -117,6 +117,7 @@ PHP NEWS
- Fixed bug #41711 (NULL temporary lobs not supported in OCI8).
(Chris Jones, Tony)
- Fixed bug #41770 (SSL: fatal protocol error due to buffer issues). (Ilia)
+- Fixed bug #41713 (Persistent memory consumption on win32 since 5.2). (Dmitry)
- Fixed bug #41709 (strtotime() does not handle 00.00.0000). (Derick)
- Fixed bug #41698 (float parameters truncated to integer in prepared
statements). (Ilia)
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;