You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2007/12/29 08:55:30 UTC
svn commit: r607394 - /httpd/httpd/branches/2.2.x/server/mpm/winnt/child.c
Author: wrowe
Date: Fri Dec 28 23:55:30 2007
New Revision: 607394
URL: http://svn.apache.org/viewvc?rev=607394&view=rev
Log:
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>
Backport: r607393
Modified:
httpd/httpd/branches/2.2.x/server/mpm/winnt/child.c
Modified: httpd/httpd/branches/2.2.x/server/mpm/winnt/child.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/mpm/winnt/child.c?rev=607394&r1=607393&r2=607394&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/server/mpm/winnt/child.c (original)
+++ httpd/httpd/branches/2.2.x/server/mpm/winnt/child.c Fri Dec 28 23:55:30 2007
@@ -80,6 +80,7 @@
*/
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);
@@ -175,7 +176,7 @@
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);
@@ -432,7 +433,7 @@
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);
}