summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2007-12-29 08:54:55 +0100
committerWilliam A. Rowe Jr <wrowe@apache.org>2007-12-29 08:54:55 +0100
commit6a533d0bf94e3b043e10d2841a95a57e2dd1867d (patch)
treee6d133ec5a04fcaa740ac3ad85ebba55ac82cf5f /server
parentSander pointed out to me that as we added ENGINE logic support (diff)
downloadapache2-6a533d0bf94e3b043e10d2841a95a57e2dd1867d.tar.xz
apache2-6a533d0bf94e3b043e10d2841a95a57e2dd1867d.zip
Fix winnt bucket_alloc to borrow memory from the transaction
pool, instead of exhausting pchild memory over a number of connections. PR: 11427 Submitted by: Alex Varju <alex varju.ca> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607393 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/mpm/winnt/child.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c
index b8e4c27e41..7627a01330 100644
--- a/server/mpm/winnt/child.c
+++ b/server/mpm/winnt/child.c
@@ -84,6 +84,7 @@ void mpm_recycle_completion_context(PCOMP_CONTEXT context)
*/
if (context) {
apr_pool_clear(context->ptrans);
+ context->ba = apr_bucket_alloc_create(context->ptrans);
context->next = NULL;
ResetEvent(context->Overlapped.hEvent);
apr_thread_mutex_lock(qlock);
@@ -187,7 +188,7 @@ PCOMP_CONTEXT mpm_get_completion_context(void)
apr_pool_tag(context->ptrans, "transaction");
context->accept_socket = INVALID_SOCKET;
- context->ba = apr_bucket_alloc_create(pchild);
+ context->ba = apr_bucket_alloc_create(context->ptrans);
apr_atomic_inc32(&num_completion_contexts);
apr_thread_mutex_unlock(child_lock);
@@ -449,7 +450,7 @@ static PCOMP_CONTEXT win9x_get_connection(PCOMP_CONTEXT context)
apr_pool_create_ex(&context->ptrans, pchild, NULL, allocator);
apr_allocator_owner_set(allocator, context->ptrans);
apr_pool_tag(context->ptrans, "transaction");
- context->ba = apr_bucket_alloc_create(pchild);
+ context->ba = apr_bucket_alloc_create(context->ptrans);
apr_thread_mutex_unlock(child_lock);
}