Ryan Bloom wrote: [...] >>memset(f->ctx, 0, (size_t)((char *)&(ctx->error_str) - (char *)ctx)); >> > >No offense, but that is an ugly line of code. :-) I really think that >error_str and time_str can just be removed from that structure. That would >allow us to not add the casts, and it would speed up that function. I'll do that >work sometime this week unless somebody beats me to it. >
I think a cast to size_t in that line is unnecesary (the result of the pointer subtraction is integral). But I just realized that there's another strong reason to just remove error_str and time_str: the fact that the structure is over 8KB basically guarantees that the apr_palloc code will have to malloc a new block from the system free list. Later today I'll post a new patch that turns error_str and time_str into char*. --Brian