]> granicus.if.org Git - php/commitdiff
Fixed bug #41713 (Persistent memory consumption on win32 since 5.2)
authorDmitry Stogov <dmitry@php.net>
Wed, 25 Jul 2007 11:13:00 +0000 (11:13 +0000)
committerDmitry Stogov <dmitry@php.net>
Wed, 25 Jul 2007 11:13:00 +0000 (11:13 +0000)
NEWS
Zend/zend_alloc.c

diff --git a/NEWS b/NEWS
index 8056a54b0499c4f6f169cd45470017f18dd3592d..be6e96bff8f47ac720ad79277707563143ca16c1 100644 (file)
--- 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)
index f6d61b4d503094f11f7679684b515adde12afb7b..7801750b90037cf37baf6a0f1fa225cf0d402321 100644 (file)
@@ -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;