You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Woolley <jw...@virginia.edu> on 2003/12/03 07:01:42 UTC

Re: cvs commit: httpd-2.0/server/mpm/winnt child.c mpm.h

On Thu, 20 Nov 2003 stoddard@apache.org wrote:

> stoddard    2003/11/20 11:44:19
>
>   Modified:    .        CHANGES
>                server/mpm/winnt child.c mpm.h
>   Log:
>   Win32: Make Win32 MPM transaction pools honor MaxMemFree
>
>                    /* Create the tranaction pool */
>   -                if ((rv = apr_pool_create(&context->ptrans, pchild)) != APR_SUCCESS) {
>   +                apr_allocator_create(&allocator);
>   +                apr_allocator_max_free_set(allocator, ap_max_mem_free);
>   +                rv = apr_pool_create_ex(&context->ptrans, NULL, NULL, allocator);
>   +                if (rv != APR_SUCCESS) {
>                        ap_log_error(APLOG_MARK,APLOG_WARNING, rv, ap_server_conf,
>                                     "mpm_get_completion_context: Failed to create the transaction pool.");
>                        CloseHandle(context->Overlapped.hEvent);
>                        return NULL;
>                    }
>   -                apr_pool_tag(context->ptrans, "ptrans");
>   +                apr_allocator_owner_set(allocator, context->ptrans);
>   +                apr_pool_tag(context->ptrans, "transaction");

This seems reasonable.  +1 (untested).  One question, though.  Why is
ptrans no longer a child pool of pchild?

--Cliff

Re: cvs commit: httpd-2.0/server/mpm/winnt child.c mpm.h

Posted by Cliff Woolley <jw...@virginia.edu>.
On Wed, 3 Dec 2003, Bill Stoddard wrote:

> Good intentions and all I was going to look into that. This was a
> straight port from worker.

Really?  Humph.  Guess we should look into that, yeah.  :-)

Re: cvs commit: httpd-2.0/server/mpm/winnt child.c mpm.h

Posted by Bill Stoddard <bi...@wstoddard.com>.
Cliff Woolley wrote:
> On Thu, 20 Nov 2003 stoddard@apache.org wrote:
> 
> 
>>stoddard    2003/11/20 11:44:19
>>
>>  Modified:    .        CHANGES
>>               server/mpm/winnt child.c mpm.h
>>  Log:
>>  Win32: Make Win32 MPM transaction pools honor MaxMemFree
>>
>>                   /* Create the tranaction pool */
>>  -                if ((rv = apr_pool_create(&context->ptrans, pchild)) != APR_SUCCESS) {
>>  +                apr_allocator_create(&allocator);
>>  +                apr_allocator_max_free_set(allocator, ap_max_mem_free);
>>  +                rv = apr_pool_create_ex(&context->ptrans, NULL, NULL, allocator);
>>  +                if (rv != APR_SUCCESS) {
>>                       ap_log_error(APLOG_MARK,APLOG_WARNING, rv, ap_server_conf,
>>                                    "mpm_get_completion_context: Failed to create the transaction pool.");
>>                       CloseHandle(context->Overlapped.hEvent);
>>                       return NULL;
>>                   }
>>  -                apr_pool_tag(context->ptrans, "ptrans");
>>  +                apr_allocator_owner_set(allocator, context->ptrans);
>>  +                apr_pool_tag(context->ptrans, "transaction");
> 
> 
> This seems reasonable.  +1 (untested).  One question, though.  Why is
> ptrans no longer a child pool of pchild?
> 
> --Cliff
> 

Good intentions and all I was going to look into that. This was a straight port from worker.

Bill