httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_core.c
Date Tue, 14 Nov 2000 01:46:43 GMT
rbb         00/11/13 17:46:43

  Modified:    src/main http_core.c
  Log:
  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.
  
  Revision  Changes    Path
  1.217     +2 -5      apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.216
  retrieving revision 1.217
  diff -u -r1.216 -r1.217
  --- http_core.c	2000/11/13 23:42:40	1.216
  +++ http_core.c	2000/11/14 01:46:39	1.217
  @@ -2964,9 +2964,6 @@
    * 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 @@
       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);
  
  
  

Mime
View raw message