httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <>
Subject RE: [PATCH] don't accept more connections than idle workers
Date Sat, 27 Apr 2002 02:30:53 GMT
On Sat, 27 Apr 2002, Sander Striker wrote:

> Huh?  apr_pcalloc == apr_palloc + memset.  The only extra overhead
> is the extra function call

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)


   Cliff Woolley
   Charlottesville, VA

View raw message