From 4ba2a417e269c75d62e112ef052b9ec0e6d38d89 Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Tue, 14 Nov 2000 01:46:39 +0000 Subject: [PATCH] We can not use heap buckets for data that was allocated out of a pool. The basic problem is that when the pool is destroyed, the data will go away unless it is in a pool bucket. If it is in a pool bucket, then the data will be copied into a heap bucket when the pool is destroyed. This becomes a real issue when we set some data off to the side to deal with pipelined requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86947 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/http_core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 045698505d..3cc1166175 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -2964,9 +2964,6 @@ static int default_handler(request_rec *r) * non-contiguous buckets. For example, if a brigade contains 10 small * buckets followed by a large bucket (or a pipe or file bucket) followed * by more small buckets, only the first 10 buckets will be coalesced. - * - * Yack... Using heap buckets which is really inefficient (multiple byte moves) - * until we get heap bucket pooling in place. */ typedef struct COALESCE_FILTER_CTX { char *buf; /* Start of buffer */ @@ -3060,11 +3057,11 @@ static apr_status_t coalesce_filter(ap_filter_t *f, ap_bucket_brigade *b) if (pass_the_brigade) { /* Insert ctx->buf into the correct spot in the brigade */ if (insert_first) { - e = ap_bucket_create_heap(ctx->buf, ctx->cnt, 1, NULL); + e = ap_bucket_create_pool(ctx->buf, ctx->cnt, 1, NULL); AP_BRIGADE_INSERT_HEAD(b, e); } else if (insert_before) { - e = ap_bucket_create_heap(ctx->buf, ctx->cnt, 1, NULL); + e = ap_bucket_create_pool(ctx->buf, ctx->cnt, 1, NULL); AP_BUCKET_INSERT_BEFORE(e, insert_before); AP_BUCKET_REMOVE(insert_before); ap_bucket_destroy(insert_before); -- 2.50.1