httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r607395 - /httpd/httpd/branches/2.0.x/server/mpm/winnt/child.c
Date Sat, 29 Dec 2007 07:55:43 GMT
Author: wrowe
Date: Fri Dec 28 23:55:43 2007
New Revision: 607395

URL: http://svn.apache.org/viewvc?rev=607395&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.0.x/server/mpm/winnt/child.c

Modified: httpd/httpd/branches/2.0.x/server/mpm/winnt/child.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/server/mpm/winnt/child.c?rev=607395&r1=607394&r2=607395&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/server/mpm/winnt/child.c (original)
+++ httpd/httpd/branches/2.0.x/server/mpm/winnt/child.c Fri Dec 28 23:55:43 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);
@@ -174,7 +175,7 @@
                 apr_allocator_owner_set(allocator, context->ptrans);
                 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_inc(&num_completion_contexts); 
 
                 apr_thread_mutex_unlock(child_lock);
@@ -424,7 +425,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);
     }
     



Mime
View raw message