Due to lingering connections, shutting down a process may take a very
long time. Free all recycled pools early in the hope that we can already
give some memory back to the OS.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1705922 13f79535-47bb-0310-9956-
ffa450edef68
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mpm_event: Free memory earlier when shutting down processes.
+ [Stefan Fritsch]
+
*) mod_ssl: Make the output filter more friendly with deferred write and
response pipelining. [Yann Ylavic, Joe Orton]
}
/* wake up the main thread */
kill(ap_my_pid, SIGTERM);
+
+ ap_free_idle_pools(worker_queue_info);
}
}
}
}
+void ap_free_idle_pools(fd_queue_info_t *queue_info)
+{
+ apr_pool_t *p;
+
+ queue_info->max_recycled_pools = 0;
+ do {
+ ap_pop_pool(&p, queue_info);
+ if (p != NULL)
+ apr_pool_destroy(p);
+ } while (p != NULL);
+}
+
+
apr_status_t ap_queue_info_term(fd_queue_info_t * queue_info)
{
apr_status_t rv;
int *had_to_block);
apr_status_t ap_queue_info_term(fd_queue_info_t * queue_info);
apr_uint32_t ap_queue_info_get_idlers(fd_queue_info_t * queue_info);
+void ap_free_idle_pools(fd_queue_info_t *queue_info);
struct fd_queue_elem_t
{