httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@apache.org>
Subject Re: [PATCH] don't accept more connections than idle workers
Date Sat, 27 Apr 2002 02:36:45 GMT
On Fri, Apr 26, 2002 at 10:30:53PM -0400, Cliff Woolley wrote:
> No, there's another difference: many optimizers will see the memset call
> and that it has a constant size as its argument and will replace that call
> (which is fairly expensive due to a loop and so fort) with inline code to
> zero out the structure.
> 
> There was talk of changing apr_pcalloc() to be a macro:
> 
> #define apr_pcalloc(pool,size) memset(apr_palloc(pool,size), '\0', size)

Fine, if that's your argument.  (And, I've been thinking of doing
this before.)

So, we should switch apr_pcalloc to fix this rather than avoid the
problem.  If we fix the problem, all of the code magically gets
optimized rather than having to work around people trying to
be cute.  -- justin

Mime
View raw message