httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: cvs commit: httpd-2.0/modules/filters mod_include.c mod_include.h
Date Sun, 11 Nov 2001 23:19:55 GMT
On 11 Nov 2001 ianh@apache.org wrote:

>        t_buck = apr_bucket_heap_create(cntx->error_str,              \
>   -                                  cntx->error_length, 1, &e_wrt); \
>   +                             strlen(cntx->error_str), 1, &e_wrt); \
>        APR_BUCKET_INSERT_BEFORE(h_ptr, t_buck);                      \

Why copy it to the heap?  It's allocated from a pool, so why not just use
a pool bucket and skip the copy unless the pool dies out from under us?

Granted, this is a nit because I'm talking about performance in the error
case, but still.

This also reminds me it's high time to get rid of the silly e_wrt
parameter from heap_create(), since it's useless (it's invariant from the
size of the bucket, and nobody really uses it anyhow).  But that's another
issue.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA




Mime
View raw message