> From: Aaron Bannert [mailto:[EMAIL PROTECTED]]
> Sent: 27 April 2002 04:17

> > > +    qi = apr_palloc(pool, sizeof(*qi));
> > > +    memset(qi, 0, sizeof(*qi));
> > 
> > Why not apr_pcalloc?
> 
> I've made a habit of not using calloc. palloc+memset is faster.

Huh?  apr_pcalloc == apr_palloc + memset.  The only extra overhead
is the extra function call, since I was asked to reduce code dup
and call apr_palloc from apr_pcalloc (formerly, the apr_pcalloc call
would do its own allocation).  I don't think we should promote
apr_palloc + memset when we have apr_pcalloc.  If it is too 'slow'
for you, you should modify apr_pools.c to be faster ;)

> In
> this case, when it will only be used once, it doesn't make much of
> a difference.

Ack.

Sander

Reply via email to