1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

BUCKET FREELISTS

Add an allocator-passing mechanism throughout the bucket brigades API.

From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook.  That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94304 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Cliff Woolley
2002-03-29 08:17:26 +00:00
parent b699ec0f91
commit 3e2ce19baf
44 changed files with 396 additions and 266 deletions

View File

@@ -207,10 +207,11 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
static void check_pipeline_flush(request_rec *r)
{
conn_rec *c = r->connection;
/* ### if would be nice if we could PEEK without a brigade. that would
### allow us to defer creation of the brigade to when we actually
### need to send a FLUSH. */
apr_bucket_brigade *bb = apr_brigade_create(r->pool);
apr_bucket_brigade *bb = apr_brigade_create(r->pool, c->bucket_alloc);
/* Flush the filter contents if:
*
@@ -222,7 +223,7 @@ static void check_pipeline_flush(request_rec *r)
if (!r->connection->keepalive ||
ap_get_brigade(r->input_filters, bb, AP_MODE_EATCRLF,
APR_NONBLOCK_READ, 0) != APR_SUCCESS) {
apr_bucket *e = apr_bucket_flush_create();
apr_bucket *e = apr_bucket_flush_create(c->bucket_alloc);
/* We just send directly to the connection based filters. At
* this point, we know that we have seen all of the data